This is the mail archive of the gcc@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]

Re: Is __USE_FIXED_PROTOTYPES__ really necessary?


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



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