This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Is __USE_FIXED_PROTOTYPES__ really necessary?
- To: manfred at ks dot sel dot alcatel dot de
- Subject: Re: Is __USE_FIXED_PROTOTYPES__ really necessary?
- From: Jim Wilson <wilson at cygnus dot com>
- Date: Mon, 06 Oct 1997 13:26:57 -0700
- cc: egcs at cygnus dot com
Another problem with __USE_FIXED_PROTOTYPES__ is that while it fixes the
prototypes, it does not fix the libraries themselves. It is possible for
a well defined ANSI C program to fail on an old system if it uses ANSI C
features that conflict with the old system, for instance, using the
return type of sprintf. If you use -D__USE_FIXED_PROTOTYPES__, then the
program will compile without any warnings or errors because the prototype
is ANSI C, but the program will fail at run time because the library is not
ANSI C. If you don't use -D__USE_FIXED_PROTOTYPES__, then you will get a
warning/error at compile time. This is much more useful behaviour, and
hence __USE_FIXED_PROTOTYPES__ should not be the default.
Jim