Andrew Haley writes:
 > Mark Mitchell writes:
 >  > 
 >  > The C++ front-end (and probably the C front-end) strips
 >  > zero-width (and possibly unnamed) bitfields after class layout.
 >  > This can be justified in that those bitfields only affect
 >  > layout; one doesn't need the middle-end to copy them around,
 >  > etc.  So, you could probably fix this in the Java front end in
 >  > the same way.
 > 
 > Do you mean running through the struct removing such fields from the
 > list?  OK, I can do that.

Ah, hold on, this doesn't seem right.

At compile time we don't know the field offset of fields that we
inherit, because it can change at runtime.  So, we don't set the
FIELD_OFFSET, and that is is why dbxout is aborting.

However, these fields are real, and they are used, but we shouldn't
output any debug info for them.  If I were to remove them from the
list of fields they'd have to be recreated because they may be needed
while compiling classes later in the same compilation unit.

I set DECL_IGNORED_P on these fields because I don't want debuginfo to
pay any attention to them.  I could, I suppose, set their offset to
zero or even error_mark_node, which seems to work.

All I want is for FIELD_OFFSET to be "don't know".

Andrew.

Reply via email to