This is the mail archive of the gcc-bugs@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: glimits.h is not compatible with -traditional


 > From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
 > 
 > In building gcc, I noticed the following warning under hpux 10.20:
 > 
 > stage1/xgcc -Bstage1/ -B/usr/local/hppa1.1-hp-hpux10.20/bin/ -c  -DIN_GCC    -g -O3 -W -Wall -Wtraditional -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -DHAVE_CONFIG_H    -I. -I../../gcc -I../../gcc/config -I../../gcc/../include ../../gcc/dwarf2out.c
 > In file included from ../../gcc/dwarf2out.c:56:
 > ../../include/md5.h:56:6: warning: traditional C rejects the `U' suffix
 > ../../include/md5.h:56:18: warning: traditional C rejects the `U' suffix
 > 
 > The warning results from defines in glimits.h that are not compatible with
 > -traditional.  For example,
 > 
 > #define UINT_MAX (INT_MAX * 2U + 1)
 > 
 > There are also various C99 defines in glimits.h which are not compatible
 > with -traditional (long long stuff).  I think these need to be surrounded
 > by appropriate ifdef __STDC__'s.
 > 
 > Dave

Note that it's the -Wtraditional flag (not -traditional) that is
warning about these, so wrapping things with __STDC__ won't change the
noise.  And -Wtraditional won't warn about stuff declared in system
headers.  Only stuff that's used in user code will actually warn.  So
if you don't make use of the e.g. long long stuff, then your program
will pass without any -Wtraditional warnings.

--
Kaveh R. Ghazi			Engagement Manager / Project Services
ghazi@caip.rutgers.edu		Qwest Internet Solutions

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