This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project.


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

Re: enum xyz;


Stan,

> 
> Indeed, this is not a hypothetical issue; Apple's C compiler used to
> make byte- and short-sized enums when it was possible to do so.  This
> caused me much grief in porting GCC, since much of the code assumed
> enums were int-sized.  I had to add many "rtx_dummy = 1000000" values
> just to force the compiler to use an int representation.
> 

Actually, MetroWerks still does do this on the Macintosh.  We have
some special code in the MacTcl header files to panic the compiler if
someone turns off the "enums always int" switch, 'cause otherwise it
causes all sorts of fun and mysterious crashes...

Jim
-- 
++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++==++
Jim Ingham                                              jingham@cygnus.com
Cygnus Solutions Inc.

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