]> granicus.if.org Git - clang/commitdiff
readd test as it passes correctly. nice, but weird
authorNuno Lopes <nunoplopes@sapo.pt>
Mon, 1 Sep 2008 22:28:55 +0000 (22:28 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Mon, 1 Sep 2008 22:28:55 +0000 (22:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@55615 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/array-init.c

index 6494b9593e98c320ca84d957fe4f5bca7c237183..bf3d83d2654ce8912e35cc68f9c2c5a2569c7225 100644 (file)
@@ -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}}