On Sep 17, 2014, at 5:42 PM, David Majnemer <[email protected]> wrote:
> Author: majnemer > Date: Wed Sep 17 19:42:05 2014 > New Revision: 218006 > > URL: http://llvm.org/viewvc/llvm-project?rev=218006&view=rev > Log: > Sema: Diagnose undefined structs used as Microsoft anonymous structs > > Previously, we would not mark structs containing anonymous structs as > invalid. Later, horrific things would occur when trying to determine > the size of the parent record. > > Instead, require the struct to be a complete type when used as an > anonymous struct. Mark both the anonymous field for the struct and the > parent context as invalid (this is similar to what we do when a struct > contains a field with an incomplete type.) Thank you David for working on this. Will this test case continue to work without error. This was the behavior before: struct anon_fault { struct undefined; }; struct undefined { int ii; }; int main() { return sizeof(struct anon_fault); } - Fariborz
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
