enum xyz;

James Ingham jingham@leda.cygnus.com
Mon Aug 9 18:15:00 GMT 1999


> 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 Ingham                                              jingham@cygnus.com
Cygnus Solutions Inc.

More information about the Gdb mailing list