diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-03-10 21:58:27 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-03-10 21:58:27 +0000 |
commit | a03aca82de5259846d4ef38db11b8116398d2222 (patch) | |
tree | 997bfd92f2d48870f696768c2cf2c9ce2bc48609 /test/Sema/enum.c | |
parent | fbe899f7143d85f11d16423568fee5ebd99beab1 (diff) |
Partial fix for PR3310, concerning type-checking for tentative
definitions. We were rejecting tentative definitions of incomplete
(which is bad), and now we don't.
This fix is partial because we don't do the end-of-translation-unit
initialization for tentative definitions that don't ever have any
initializers specified.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66584 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Sema/enum.c')
-rw-r--r-- | test/Sema/enum.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/Sema/enum.c b/test/Sema/enum.c index ce49f3064d..37c9a1e7cf 100644 --- a/test/Sema/enum.c +++ b/test/Sema/enum.c @@ -21,13 +21,11 @@ int test() { return sizeof(enum e) ; } -enum gccForwardEnumExtension ve; // expected-error {{variable has incomplete type 'enum gccForwardEnumExtension'}} \ - // expected-warning{{ISO C forbids forward references to 'enum' types}} \ - // expected-note{{forward declaration of 'enum gccForwardEnumExtension'}} +enum gccForwardEnumExtension ve; // expected-warning{{ISO C forbids forward references to 'enum' types}} int test2(int i) { - ve + i; + ve + i; // expected-error{{invalid operands to binary expression}} } // PR2020 |