This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: HP-UX header file fixup.


> > When compiling programs on HP-UX 11.23 platforms with
> > -D_FILE_OFFSET_BITS=64 the /usr/include/sys/socket.h header file will
> > declare sendfile and sendpath as extern and then as static.  The HP
> > compiler gives a warning on this but GCC gives a hard error.
> 
> I have no problem with the patch but giving a hard error in a
> system header is annoying if GCC could handle this as a warning.

Is that an approval for checkin?

It looks like GCC changed this from a warning to an error in the 4.0
time frame.  3.4.5 gives a warning on extern function declarations
followed by a static declaration, 4.0.2 gives an error.  I tried to
track down the version where it changed and I think it happened at svn
version 84046 (gcc/c-decl.c).  There isn't a clear explanation of the
change, just that the behaviour is undefined according to the C standard.

Steve Ellcey
sje@cup.hp.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]