Don <> changed:

           What    |Removed                     |Added
            Summary|{ } struct literals not     |member default initializers
                   |documented, and not working |not working in static
                   |                            |struct initializers

--- Comment #4 from Don <> 2012-05-29 00:56:54 PDT ---
They are documented in struct.html, "Static Initialization of Structs"

The bug is that default initializers are ignored for members which aren't in
the struct static initializer. When this bug was originally filed, they got
Now they use the default initializer for the type, but they should use the
member initializer, if one is present.

Barely tested patch, in init.c (350), StructInitializer::toExpression():

            if (!(*elements)[i])
               // Default initialize
+                if (vd->init)
+                    (*elements)[i] = vd->init->toExpression();
+                else                
                    (*elements)[i] = vd->type->defaultInit();

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

Reply via email to