[PATCH] fix AIX fortran builds
Jim Wilson
wilson@tuliptree.org
Mon Oct 30 06:36:00 GMT 2017
A Power AIX build with fortran enabled fails in stage2, because longjmp
is not declared noreturn in system header files. That is probably only
true on systems where gcc is the system compiler, since this is a GCC
extension.
.../../gcc-git/gcc/fortran/parse.c: In function 'void unexpected_eof()':
.../../gcc-git/gcc/fortran/parse.c:2740:1: error: 'noreturn' function
does return [-Werror]
}
^
If I drop ATTRIBUTE_NORETURN on the unexpected_eof declaration, then I
get 18 errors that look like this one. This is stage2 of a linux
build.
.../../gcc-svn/gcc/fortran/parse.c: In function ‘gfc_statement
parse_spec(gfc_statement)’:
.../../gcc-svn/gcc/fortran/parse.c:3745:22: error: this statement may
fall through [-Werror=implicit-fallthrough=]
unexpected_eof ();
~~~~~~~~~~~~~~~^~
.../../gcc-svn/gcc/fortran/parse.c:3747:5: note: here
case ST_IMPLICIT_NONE:
^~~~
If I add a call to gcc_unreachable after the longjmp call, then it
builds on both linux and AIX. Anyone have a better idea on how to fix
this? If I don't get any responses in a few days, I will check it in
under the obvious rule, since it fixes a build failure.
Jim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aix-fortran.patch
Type: text/x-patch
Size: 505 bytes
Desc:
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20171030/daa9426b/attachment.bin>
More information about the Fortran
mailing list