This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Help with bit-field semantics in C and C++
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: "Steven L. Zook" <SLZook at Qualstar dot com>
- Cc: "GCC Mailing List (E-mail)" <gcc at gcc dot gnu dot org>
- Date: 27 Aug 2004 23:54:57 +0200
- Subject: Re: Help with bit-field semantics in C and C++
- Organization: Integrable Solutions
- References: <9E27B4AB55478346B9F7848926E49B7F4F6FCF@exchange1.qualstar.com>
"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