<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Sep 17, 2014, at 5:42 PM, David Majnemer <<a href="mailto:david.majnemer@gmail.com">david.majnemer@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Author: majnemer<br>Date: Wed Sep 17 19:42:05 2014<br>New Revision: 218006<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=218006&view=rev">http://llvm.org/viewvc/llvm-project?rev=218006&view=rev</a><br>Log:<br>Sema: Diagnose undefined structs used as Microsoft anonymous structs<br><br>Previously, we would not mark structs containing anonymous structs as<br>invalid.  Later, horrific things would occur when trying to determine<br>the size of the parent record.<br><br>Instead, require the struct to be a complete type when used as an<br>anonymous struct.  Mark both the anonymous field for the struct and the<br>parent context as invalid (this is similar to what we do when a struct<br>contains a field with an incomplete type.)<br></blockquote></div><br><div><br></div><div>Thank you David for working on this. Will this test case continue to work without error. This was the behavior before:</div><div><br></div><div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">struct anon_fault {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><span class="Apple-tab-span" style="white-space:pre">  </span>struct undefined;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">};</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">struct undefined {</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">  int ii;</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">};</div><div style="margin: 0px; font-size: 11px; font-family: Menlo; min-height: 13px;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">int main()</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">{</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">  return sizeof(struct anon_fault);</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">}</div></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br></div><div style="margin: 0px; font-size: 11px; font-family: Menlo;">- Fariborz</div><div style="margin: 0px; font-size: 11px; font-family: Menlo;"><br></div></body></html>