--- Comment #6 from Don <> 2012-02-01 07:13:36 PST ---
(In reply to comment #5)
> (In reply to comment #4)
> > Not exactly. It's a compiler structural problem: there's no way to specify a
> > struct literal with missing fields. Struct static initializers can do it, 
> > but
> > struct literals cannot.
> > 
> > I think the solution is to merge struct literals with struct static
> > initializers, as it says in a TODO in the code.
> One of the D1 cases seems to have the same problem with struct static
> initializers.  Can't this be done by just nulling out the untouched fields in
> the Expressions array and ensuring at least one field gets initialized?

Maybe. The order of fields in a struct is fixed, so in theory that ought to
It's a while since I last looked at it, but I remember there were severe
problems with anonymous unions nested inside anonymous unions. There's code
elsewhere in the compiler which tries to identify fields based on their type +
offset, but that cannot work. It appears to work at the moment, but only
because it assumes when fields are initialized in order with no gaps.
Still, I've fixed some of those compiler bugs recently, so maybe it's more
possible now.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to