This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: Help with bit-field semantics in C and C++


Mike Stump <mrs@apple.com> writes:

| On Tuesday, August 24, 2004, at 12:37  PM, Gabriel Dos Reis wrote:
| > | > The enum case is more like NaNs
| > |
| > | ?  Can you please back this by citing the standard?
| >
| > 7.2/6
| >   For an enumeration where emin is the smallest enumerator and emax is
| 
| Let me try it a different way...   I am skeptical that taking
| additional advantage of rules that exist in C++ and not C is wise.
| Everything else flows from that.

Some programs for memory-constrained environment benefit from the
advantage that C++ enums can be smaller than C's.  I see no value in
penalizing them, just because C chosed to optimize against
abstractions. 
The C++ rules for enums are carefully crafted, not a result of
oversight.  I see no benefits in actively betraying their letters and
spirits. 

-- Gaby


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