<div dir="ltr">Yes, we should add this soon, its pretty bad and confusing. I would actually prefer an error to a warning, since I would much rather deal with complaints about clang not working than complaints about hard to find miscompilations. <div>
<br></div><div>Does anyone object to an error on designated initializers until it gets implemented?</div><div><br></div><div> - Daniel<br><div><br></div><div><div class="gmail_quote">On Thu, Oct 16, 2008 at 5:27 PM, Eli Friedman <span dir="ltr"><<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="Ih2E3d">On Thu, Oct 16, 2008 at 3:50 PM, Sascha Wildner <<a href="mailto:swildner@erpicon.de">swildner@erpicon.de</a>> wrote:<br>

> "Each brace-enclosed initializer list has an associated current object.<br>
> When no designations are present, subobjects of the current object are<br>
> initialized in order according to the type of the current object: array<br>
> elements in increasing subscript order, structure members in declaration<br>
> order, and the first named member of a union. In contrast, a designation<br>
> causes the following initializer to begin initialization of the<br>
> subobject described by the designator. Initialization then continues<br>
> forward in order, beginning with the next subobject after that described<br>
> by the designator."<br>
<br>
</div>Designators currently get ignored by the parser.  There's been some<br>
discussion of how to implement it; unfortunately, it ends up being<br>
relatively complicated, and nobody has gotten around to it.<br>
<br>
It would probably be a good idea to add a warning as an interim measure, though.<br>
<font color="#888888"><br>
-Eli<br>
</font><div><div></div><div class="Wj3C7c">_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div></div></div>