This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH for c++/35316 (typeof bitfield)
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 24 Apr 2008 00:36:50 -0700
- Subject: Re: C++ PATCH for c++/35316 (typeof bitfield)
- References: <480E70EC.5080808@redhat.com>
Jason Merrill wrote:
The times when DECL_C_BIT_FIELD and DECL_BIT_FIELD_TYPE are set are not
the same, and we were crashing if the former but not the latter were
set. Fixed by just using DECL_BIT_FIELD_TYPE if it is set, and not
otherwise.
Will this do the right thing for a compiler-generated bit-field in the
structure? The reason that I used DECL_C_BIT_FIELD was that I
understood that macro to mean "the user declared this to be a
bit-field". If the user didn't declare it as such, but it ended up as
one, then I don't think we want to do anything special in the front end.
(For example, one can imagine an ABI where things not declared as
bit-fields are packed into spare space between bit-fields.)
Why is DECL_C_BIT_FIELD not set for the example in your test case?
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713