summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/incomplete-decl.c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-07-20 18:46:59 +0000
committerDouglas Gregor <dgregor@apple.com>2009-07-20 18:46:59 +0000
commit47d2859b3e27c3ce904ac62249d4297e6bf9726d (patch)
tree2a0e74ab0628e2c67e5c499f11964597170f44a6 /clang/test/Sema/incomplete-decl.c
parentaf9f362840f8d69cc15102dec1e735b70d1aee73 (diff)
downloadbcm5719-llvm-47d2859b3e27c3ce904ac62249d4297e6bf9726d.tar.gz
bcm5719-llvm-47d2859b3e27c3ce904ac62249d4297e6bf9726d.zip
Improve GCC compatibility by allowing static tentative definitions of
incomplete type (with a warning), from Enea Zaffanella! llvm-svn: 76451
Diffstat (limited to 'clang/test/Sema/incomplete-decl.c')
-rw-r--r--clang/test/Sema/incomplete-decl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/Sema/incomplete-decl.c b/clang/test/Sema/incomplete-decl.c
index eb93e8e3803..6a6ba753f3f 100644
--- a/clang/test/Sema/incomplete-decl.c
+++ b/clang/test/Sema/incomplete-decl.c
@@ -1,12 +1,13 @@
// RUN: clang-cc -fsyntax-only -verify %s
-struct foo; // expected-note 4 {{forward declaration of 'struct foo'}}
+struct foo; // expected-note 5 {{forward declaration of 'struct foo'}}
void b; // expected-error {{variable has incomplete type 'void'}}
struct foo f; // expected-error{{tentative definition has type 'struct foo' that is never completed}}
static void c; // expected-error {{variable has incomplete type 'void'}}
-static struct foo g; // expected-error {{variable has incomplete type 'struct foo'}}
+static struct foo g; // expected-warning {{tentative definition of variable with internal linkage has incomplete non-array type 'struct foo'}} \
+ expected-error{{tentative definition has type 'struct foo' that is never completed}}
extern void d;
extern struct foo e;
OpenPOWER on IntegriCloud