https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72833
Bug ID: 72833 Summary: [7 regression] error in fortran/parse.c (unexpected_eof) on Mac OS X 10.7 Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: bootstrap Assignee: unassigned at gcc dot gnu.org Reporter: ro at gcc dot gnu.org CC: edlinger at gcc dot gnu.org Target Milestone: --- Host: x86_64-apple-darwin11.4.2 Target: x86_64-apple-darwin11.4.2 Build: x86_64-apple-darwin11.4.2 Between 20160729 and 20160805, Mac OS X 10.7 bootstrap got broken: /vol/gcc/src/hg/trunk/local/gcc/fortran/parse.c: In function 'void unexpected_eof()': /vol/gcc/src/hg/trunk/local/gcc/fortran/parse.c:2618:1: error: 'noreturn' function does return [-Werror] } ^ Unlike Solaris, Linux, and e.g. macOS 10.12, the Mac OS 10.7 <setjmp.h> (or <i386/setjmp.h>, to be exact) doesn't declare longjmp noreturn, as can be seen in the following example: $ cat lj-nr.c #include <setjmp.h> static jmp_buf eof_buf; void unexpected_eof (void) __attribute__((__noreturn__)); void unexpected_eof (void) { longjmp (eof_buf, 1); } gcc 6.1 compiles it without error, while $ ./trunk/10.7-gcc/build/prev-gcc/xgcc -B ./trunk/10.7-gcc/build/prev-gcc/ -c ~/lj-nr.c /homes/ro/lj-nr.c: In function 'unexpected_eof': /homes/ro/lj-nr.c:11:1: warning: 'noreturn' function does return } ^ This is obviously caused by 2016-08-03 Bernd Edlinger <bernd.edlin...@hotmail.de> PR middle-end/71876 * calls.c (special_function_p): Remove special handling of "setjmp_syscall", "qsetjmp", "longjmp", "siglongjmp" and the prefix "__x". Recognize "savectx", "vfork" and "getcontext" only without prefix. Remove potentially unsafe ECF_LEAF and ECF_NORETURN. Rainer