]> granicus.if.org Git - clang/commitdiff
64-bit test fixes.
authorSebastian Redl <sebastian.redl@getdesigned.at>
Wed, 12 Nov 2008 21:19:11 +0000 (21:19 +0000)
committerSebastian Redl <sebastian.redl@getdesigned.at>
Wed, 12 Nov 2008 21:19:11 +0000 (21:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59165 91177308-0d34-0410-b5e6-96231b3b80d8

test/Sema/array-init.c
test/Sema/compound-literal.c

index bf3d83d2654ce8912e35cc68f9c2c5a2569c7225..9d2a942410aecc43a0d9b9d27f5b5bd824dc9666 100644 (file)
@@ -9,7 +9,7 @@ int ary2[] = { x, y, z }; // expected-error{{initializer element is not a compil
 
 extern int fileScopeExtern[3] = { 1, 3, 5 }; // expected-warning{{'extern' variable has an initializer}}
 
-static int ary3[] = { 1, "abc", 3, 4 }; // expected-warning{{incompatible pointer to integer conversion initializing 'char [4]', expected 'int'}}
+static long ary3[] = { 1, "abc", 3, 4 }; // expected-warning{{incompatible pointer to integer conversion initializing 'char [4]', expected 'long'}}
 
 void func() {
   int x = 1;
@@ -48,7 +48,7 @@ void func() {
   
   extern int blockScopeExtern[3] = { 1, 3, 5 }; // expected-error{{'extern' variable cannot have an initializer}}
   
-  static int x2[3] = { 1.0, "abc" , 5.8 }; // expected-warning{{incompatible pointer to integer conversion initializing 'char [4]', expected 'int'}}
+  static long x2[3] = { 1.0, "abc" , 5.8 }; // expected-warning{{incompatible pointer to integer conversion initializing 'char [4]', expected 'long'}}
 }
 
 void test() {
@@ -225,15 +225,15 @@ int noNamedImplicitCheck[sizeof(noNamedImplicit) == 3 * sizeof(*noNamedImplicit)
 
 // ptrs are constant
 struct soft_segment_descriptor {
-       int ssd_base;
+       long ssd_base;
 };
 static int dblfault_tss;
 
 union uniao { int ola; } xpto[1];
 
 struct soft_segment_descriptor gdt_segs[] = {
-       {(int) &dblfault_tss},
-       { (int)xpto},
+       {(long) &dblfault_tss},
+       { (long)xpto},
 };
 
 static void sppp_ipv6cp_up();
index 1de0e0bec44084fbc6e296b387a62523548a9cbf..59e7bfab5b9b6fd1834510fe8fdc2a3cc2c0d644 100644 (file)
@@ -9,7 +9,7 @@ static int *p = (int []){2,4};
 static int x = (int){1}; // -expected-warning{{braces around scalar initializer}}
 
 static int *p2 = (int []){2,x}; // -expected-error {{initializer element is not a compile-time constant}}
-static int *p3 = (int []){2,"x"}; // -expected-warning {{incompatible pointer to integer conversion initializing 'char [2]', expected 'int'}}
+static long *p3 = (long []){2,"x"}; // -expected-warning {{incompatible pointer to integer conversion initializing 'char [2]', expected 'long'}}
 
 typedef struct { } cache_t; // -expected-warning{{use of empty struct extension}}
 static cache_t clo_I1_cache = ((cache_t) { } ); // -expected-warning{{use of GNU empty initializer extension}}