[cfe-commits] r46152 - in /cfe/trunk: Sema/SemaDecl.cpp test/Sema/array-constraint.c test/Sema/deref.c test/Sema/enum.c test/Sema/incomplete-decl.c

Neil Booth neil at daikokuya.co.uk
Fri Jan 18 17:15:38 PST 2008


Steve Naroff wrote:-

> 
> On Jan 18, 2008, at 4:44 PM, Neil Booth wrote:
> 
> >Steve Naroff wrote:-
> >
> >>+struct foo f; // expected-error {{variable has incomplete type  
> >>'struct foo'}}
> >
> >Why do you think there is something inherently wrong with this?  In
> >general you have to wait until the end of the TU.
> >
> 
> You are correct.
> 
> To properly diagnose this, clang needs to check for incomplete types  
> at the end of the translation unit.
> 
> I remember putting the following FIXME in SemaDecl.cpp:
> 
> /// FIXME: Need to carefully consider tentative definition rules (C99  
> 6.9.2p2).
> /// For example, we incorrectly complain about i1, i4 from C99 6.9.2p4.
> 
> This requires a bit more API fiddling. For example, we need a  
> ActOnEndTranslationUnit action, etc.
> 
> In fact, when I added the FIXME above, clang didn't even have the  
> notion of a TranslationUnit:-)

Thanks, I wasn't aware of the FIXME. :)

Neil.



More information about the cfe-commits mailing list