Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Watcom C/C++ User's Guide - the integral type of an enumerated type is determined by the values of the http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
The integral type of an enumerated type is determined by the values of the
enumeration constants.  In strict ANSI C mode, all enumerated constants are
of type int.  In the extensions mode, the compiler will use the smallest
integral type possible (excluding long ints) that can represent all values
of the enumerated type.  For instance, if the minimum and maximum values of
the enumeration constants are in the range -128 and 127, the enumerated type
will be equivalent to a signed char (size = 1 byte).  All references to
enumerated constants in the previous instance will have type signed char.
 An enumerated constant is always promoted to an int when passed as an
argument.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson