Help with bit-field semantics in C and C++
Gabriel Dos Reis
gdr@integrable-solutions.net
Tue Aug 24 21:11:00 GMT 2004
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
More information about the Gcc
mailing list