This is the mail archive of the gcc-patches@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: C++ PATCH for c++/35316 (typeof bitfield)


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


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