From patchwork Sat Aug 13 16:55:06 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 658987 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sBSYZ5SzTz9syB for ; Sun, 14 Aug 2016 02:55:28 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=AVLntIlE; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :mime-version:content-type:date:subject:cc:to:message-id; q=dns; s=default; b=CXMoxn8Pbts1OCQyznp1PiAXdm1FZcJxv1N1gWgUQxosq/yQAt VKEMY4XtX+L8mXTfi3h8abJ4vG9ASXzCpdDi4HLG0r9ItvD/GbGn667rMB5twYVU MLUHdG2m9DgOUDESqEoiIYMoBPHzMShNndUGDinG39iRv8hZ2uC01aWPg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :mime-version:content-type:date:subject:cc:to:message-id; s= default; bh=LxuFLOFTbT2T8tqwI0EOuP7qy64=; b=AVLntIlE7Ly1jPXHtNgY W+bAWfwdkrfJHGLbHhP1laAVExmSrJOrBmnYN4w2KyatG9Dvhf27IIa6c98LUC7C HsTG3eb8C/L7ufReWTfyNGDmo6yR8gXUHBtTRNGSKuR/ZSzvRdSiLRrVvxTVp5mH raME0C89RtAts/ATHeLQIyQ= Received: (qmail 21743 invoked by alias); 13 Aug 2016 16:55:20 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 21733 invoked by uid 89); 13 Aug 2016 16:55:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL, BAYES_50, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, SPF_PASS, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 spammy=DIN, libbacktrace, Wcast-qual, pedantic X-HELO: torfep02.bell.net Received: from simcoe208srvr.owm.bell.net (HELO torfep02.bell.net) (184.150.200.208) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 13 Aug 2016 16:55:09 +0000 Received: from bell.net torfep02 184.150.200.158 by torfep02.bell.net with ESMTP id <20160813165507.LJHN3646.torfep02.bell.net@torspm02.bell.net> for ; Sat, 13 Aug 2016 12:55:07 -0400 Received: from [192.168.2.10] (really [70.54.56.11]) by torspm02.bell.net with ESMTP id <20160813165507.OJSO19412.torspm02.bell.net@[192.168.2.10]>; Sat, 13 Aug 2016 12:55:07 -0400 From: John David Anglin Mime-Version: 1.0 (Apple Message framework v1085) Date: Sat, 13 Aug 2016 12:55:06 -0400 Subject: [PATCH] New hpux fix to add noreturn attribute to longjmp declarations in setjmp.h Cc: bkorb@gnu.org To: GCC Patches Message-Id: <13A93BA9-9EC0-4BDD-8D7E-440808F6C334@bell.net> X-Opwv-CommTouchExtSvcRefID: str=0001.0A020204.57AF50EB.006B, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 Currently, trunk fails to boot fortran on hpux because of the following error: /xxx/gnu/gcc/objdir/./prev-gcc/xg++ -B/xxx/gnu/gcc/objdir/./prev-gcc/ -B/opt/gnu64/gcc/gcc-7/hppa64-hp-hpux11.00/bin/ -nostdinc++ -B/xxx/gnu/gcc/objdir/prev-hppa64-hp-hpux11.00/libstdc++-v3/src/.libs -B/xxx/gnu/gcc/objdir/prev-hppa64-hp-hpux11.00/libstdc++-v3/libsupc++/.libs -I/xxx/gnu/gcc/objdir/prev-hppa64-hp-hpux11 .00/libstdc++-v3/include/hppa64-hp-hpux11.00 -I/xxx/gnu/gcc/objdir/prev-hppa64- hp-hpux11.00/libstdc++-v3/include -I/xxx/gnu/gcc/gcc/libstdc++-v3/libsupc++ -L/xxx/gnu/gcc/objdir/prev-hppa64-hp-hpux11.00/libstdc++-v3/src/.libs -L/xxx/gnu/gc c/objdir/prev-hppa64-hp-hpux11.00/libstdc++-v3/libsupc++/.libs -fno-PIE -c -DIN _GCC_FRONTEND -g -O2 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwin d-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-at tribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno- overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -I. -Ifortran -I../../gc c/gcc -I../../gcc/gcc/fortran -I../../gcc/gcc/../include -I../../gcc/gcc/../libc pp/include -I/opt/gnu64/gcc/gmp/include -I../../gcc/gcc/../libdecnumber -I../.. /gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc/gcc/../libbacktrace -o fortran/parse.o -MT fortran/parse.o -MMD -MP -MF fortran/.deps/parse.TPo ../ ../gcc/gcc/fortran/parse.c ../../gcc/gcc/fortran/parse.c: In function 'void unexpected_eof()': ../../gcc/gcc/fortran/parse.c:2618:1: error: 'noreturn' function does return [-W error] The attached patch fixes the above by adding the noreturn attribute to the "longjmp" declarations in setjmp.h. Okay for trunk? Dave --- John David Anglin dave.anglin@bell.net 2016-08-13 John David Anglin * inclhack.def (hpux_longjmp): New fix. * fixincl.x: Regenerate. * tests/base/setjmp.h: New test file. Index: inclhack.def =================================================================== --- inclhack.def (revision 239324) +++ inclhack.def (working copy) @@ -2642,6 +2642,21 @@ }; /* + * Add noreturn attribute to longjmp declarations in hpux + */ +fix = { + hackname = hpux_longjmp; + mach = "*-hp-hpux*"; + files = setjmp.h; + select = "^[ \t]*extern[ \t]+void.*longjmp[ \t]+__\\(\\(.*int\\)\\)"; + + c_fix = format; + c_fix_arg = "%0 __attribute__ ((__noreturn__))"; + + test_text = 'extern void longjmp __((jmp_buf, int));'; +}; + +/* * Fix hpux10.20 to avoid invalid forward decl */ fix = { --- /dev/null 2016-08-13 12:36:13 -0400 +++ tests/base/setjmp.h 2016-08-10 09:41:48 -0400 @@ -0,0 +1,14 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/setjmp.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + + + +#if defined( HPUX_LONGJMP_CHECK ) +extern void longjmp __((jmp_buf, int)) __attribute__ ((__noreturn__)); +#endif /* HPUX_LONGJMP_CHECK */