This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Patch for undefined behaviour in gcc
Date: Fri, 27 Oct 2000 10:54:32 +0200
From: Andreas Schwab <schwab@suse.de>
Show me where this is documented as a GCC extension. I cannot find it
anywhere in the GCC docs.
That is a problem, but it can be addressed by fixing GCC's
documentation; you don't need to change GCC's behavior.
GCC's behavior with "defined" is a longstanding and natural extension
to the C language, and is supported by many C compilers. Surely there
is no intention to withdraw support for this extension. So it doesn't
make much sense to argue that glibc should not use this behavior,
simply because the behavior doesn't happen to be documented.
The C standard does not require a diagnostic for the use of this
extension, so whether a diagnostic should be issued is a pragmatic
question, not a conformance issue. Personally, I don't see why it
should be issued for system headers. Users who want this warning
generally don't want to see it for system heaers.