Although I can't say I'm fond of adding options for this particular behavior, how bad would it be to put a bit in LangOptions saying "dont support designated initializers" and only set this bit for IR generation. This would prevent the user from seeing unrelated errors due to the misanalysis of designated initializers, i.e. excess elements warnings and be simpler to add (and remove).<br>
<br> - Daniel<br><br><div class="gmail_quote">On Thu, Oct 16, 2008 at 10:29 PM, Chris Lattner <span dir="ltr"><<a href="mailto:clattner@apple.com">clattner@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d"><br>
On Oct 16, 2008, at 7:16 PM, Daniel Dunbar wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
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.<br>

<br>
Does anyone object to an error on designated initializers until it gets implemented?<br>
</blockquote>
<br></div>
The problem with this is that it will break code that doesn't really care, such as the static analyzer and rewriter.  I'd be fine with codegen producing an error on this though.  This would require adding a tiny bit of tracking to know when a designator was used though.<br>
<font color="#888888">
<br>
-Chris<br>
</font></blockquote></div><br>