summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/incomplete-decl.c
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-04-15 21:35:27 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-04-15 21:35:27 +0000
commitc7ba5333782fb9643c35f94effca96c5f7526824 (patch)
tree270ef39d73cd95c319ae399ad5fe9f89f50dbc5d /clang/test/Sema/incomplete-decl.c
parentbc8a78d5a47f66cde93f5cae0ae19ffbaf33c6dc (diff)
downloadbcm5719-llvm-c7ba5333782fb9643c35f94effca96c5f7526824.tar.gz
bcm5719-llvm-c7ba5333782fb9643c35f94effca96c5f7526824.zip
Add warning when a tentative array definition is assumed to have one element.
- Also, fixed one to actually be one (instead of zero). :) llvm-svn: 69226
Diffstat (limited to 'clang/test/Sema/incomplete-decl.c')
-rw-r--r--clang/test/Sema/incomplete-decl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/test/Sema/incomplete-decl.c b/clang/test/Sema/incomplete-decl.c
index c4183ca72fa..eb93e8e3803 100644
--- a/clang/test/Sema/incomplete-decl.c
+++ b/clang/test/Sema/incomplete-decl.c
@@ -11,7 +11,7 @@ static struct foo g; // expected-error {{variable has incomplete type 'struct f
extern void d;
extern struct foo e;
-int ary[];
+int ary[]; // expected-warning {{tentative array definition assumed to have one element}}
struct foo bary[]; // expected-error {{array has incomplete element type 'struct foo'}}
void func() {
@@ -20,7 +20,7 @@ void func() {
struct foo f; // expected-error {{variable has incomplete type 'struct foo'}}
}
-int h[];
+int h[]; // expected-warning {{tentative array definition assumed to have one element}}
int (*i)[] = &h+1; // expected-error {{arithmetic on pointer to incomplete type 'int (*)[]'}}
struct bar j = {1}; // expected-error {{variable has incomplete type 'struct bar'}} \
OpenPOWER on IntegriCloud