Summary: Anonymous structs/unions should have their own context
Version: D1 & D2
--- Comment #0 from Iain Buclaw <ibuc...@ubuntu.com> 2011-02-21 14:41:28 PST ---
This is kinda in the same league as bug1432, and I'm pretty certain fixing this
will fix the other bug too.
Basic example to show what I'm talking about:
Here, DMD reports that the union has 3 members, this is IMHO a bogus analysis.
The union has 2 members, and one of them is an anonymous structure who is also
the parent/context of the two fields (hi, lo) that it encases.
This particular example also hurts GDC in some instances, as having a member of
a *union* to whom's offset is > 0 confuses the backend. But there is currently
no way/information available at the codegen stage to prevent this; except,
perhaps looking ahead to scan the offset of all union members to see if the
frontend is hiding a structure somewhere.
This is less than ideal though, and would be better if there was anything to
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------