Traditional C chokes on struct/union initialization in new cpplex.c

Kaveh R. Ghazi ghazi@caip.rutgers.edu
Thu Jul 6 10:03:00 GMT 2000


 > From: Jeffrey A Law <law@cygnus.com>
 > 
 >   > I hacked up this patch and got midway through stage2 so far.  Assuming
 >   > bootstrap succeeds, ok to install?
 >   > 
 >   > 		--Kaveh
 >   > 
 >   > 
 >   > 2000-07-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 >   > 
 >   > 	* cpplex.c (placemarker_token, eof_token): Don't initialize struct
 >   > 	union member in traditional C.
 > 
 > The way this has been handled in BFD and elsewhere is to simply
 > omit the union initialization when ___STDC__.
 > 
 > See this change in BFD as an example.
 > 
 > 1999-08-06  Ian Lance Taylor  <ian@zembu.com>
 > 
 >         * section.c (global_syms): Only initialize union field if
 >         __STDC__.
 > 
 > Unless there is significant benefit, we should adopt the same
 > conventions as other GNU projects.

Okay, I'll do s/ANSI_PROTOTYPES/__STDC__/ in the patch.

BTW the 3-stage completed, any other objections or is it good to go?

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


More information about the Gcc-patches mailing list