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

Gabriel Dos Reis gdr@integrable-solutions.net
Fri Aug 27 22:02:00 GMT 2004


"Steven L. Zook" <SLZook@Qualstar.com> writes:

| What would happen in this case?
| 
| enum eSparse { One = 1, Two = 2, Four = 4, Eight = 8 };
| eSpare Sparse = ( eSparse )0x0FFFF;

I guess I don't understand your question.  The smallest bit-field that
can represent One and Eight is 4 bits wide.  Right?

-- Gaby



More information about the Gcc mailing list