Walter Bright <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #1 from Walter Bright <> 2011-10-24 
20:57:25 PDT ---
There have been several patches to 'fix' struct/union initialization.
Evidently, we need to step back a bit and rethink/reengineer it. Something
along the lines of:

1. Create a list of all the fields, in lexical order. Each field will have a
beginning offset and an ending offset. One field 'overlaps' another if its
offset range overlaps the other.

2. Examine list of initializers. Unnamed initializers will be associated with a
field as follows:
    1. if it's the first initializer, it's the first field. Done.
    2. start with the previous field that was initialized. Move forward through
    the field list and pick the first field that does not overlap with that
    previous field. That will be the field associated with that initializer.

3. If any initialized field overlaps with any other initialized field, error.

4. Go back through the field list again, in order. If a field does not have an
initializer, and does not overlap with any other initialized field, assign it
the default initializer.

At this point, I wish to defer this to the next update.

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

Reply via email to