summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2008-09-01 22:28:55 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2008-09-01 22:28:55 +0000
commit4e630967fc3dc92175e3b3224ec4c196ad514b4b (patch)
tree9ad73d17dd76e5614879e65a3df6fd61595f09f5 /clang/test
parent4c55e2c4ed0f9beba12dc862fd6a7f3171e36d29 (diff)
downloadbcm5719-llvm-4e630967fc3dc92175e3b3224ec4c196ad514b4b.tar.gz
bcm5719-llvm-4e630967fc3dc92175e3b3224ec4c196ad514b4b.zip
readd test as it passes correctly. nice, but weird
llvm-svn: 55615
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Sema/array-init.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/clang/test/Sema/array-init.c b/clang/test/Sema/array-init.c
index 6494b9593e9..bf3d83d2654 100644
--- a/clang/test/Sema/array-init.c
+++ b/clang/test/Sema/array-init.c
@@ -222,5 +222,19 @@ struct {int:5;} x[] = {6}; //expected-error{{initializer for aggregate with no e
struct {int a; int:5;} noNamedImplicit[] = {1,2,3};
int noNamedImplicitCheck[sizeof(noNamedImplicit) == 3 * sizeof(*noNamedImplicit) ? 1 : -1];
+
+// ptrs are constant
+struct soft_segment_descriptor {
+ int ssd_base;
+};
+static int dblfault_tss;
+
+union uniao { int ola; } xpto[1];
+
+struct soft_segment_descriptor gdt_segs[] = {
+ {(int) &dblfault_tss},
+ { (int)xpto},
+};
+
static void sppp_ipv6cp_up();
const struct {} ipcp = { sppp_ipv6cp_up }; //expected-warning{{empty struct extension}} expected-warning{{excess elements in array initializer}}
OpenPOWER on IntegriCloud