commit | 8877f99f9de829690bd14edded2fadbfe2675aec | [log] [tgz] |
---|---|---|
author | Nuno Lopes <nunoplopes@sapo.pt> | Mon Feb 02 15:00:55 2009 +0000 |
committer | Nuno Lopes <nunoplopes@sapo.pt> | Mon Feb 02 15:00:55 2009 +0000 |
tree | 5ebbf9dde8b5f7ccdb6f1908b8e4747cd420e365 | |
parent | 6f361ff3450b5e61e53500269fbef5a7555f0f05 [diff] [blame] |
fix PR3459: improve compatibility with gcc when checking for constant exprs llvm-svn: 63517
diff --git a/clang/test/Sema/struct-decl.c b/clang/test/Sema/struct-decl.c new file mode 100644 index 0000000..cacd847 --- /dev/null +++ b/clang/test/Sema/struct-decl.c
@@ -0,0 +1,10 @@ +// RUN: clang -fsyntax-only -verify %s + +// PR3459 +struct bar { + char n[1]; +}; + +struct foo { + char name[(int)&((struct bar *)0)->n]; +};