diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-10-25 23:11:15 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-10-25 23:11:15 +0000 |
commit | 9e4e2d1819973db3ed328a38847eefebd97285d4 (patch) | |
tree | 1c86505faca42d100b150fc28d22efc0842d0624 | |
parent | 961f0708fb66375acf47f9e9bc1aecfb3f992aea (diff) |
Phrase compile time assert in standard way.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85079 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/Sema/vector-init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/Sema/vector-init.c b/test/Sema/vector-init.c index 18104d871d..9dac6c7114 100644 --- a/test/Sema/vector-init.c +++ b/test/Sema/vector-init.c @@ -8,7 +8,7 @@ float4 foo = (float4){ 1.0, 2.0, 3.0, 4.0 }; float4 foo2 = (float4){ 1.0, 2.0, 3.0, 4.0 , 5.0 }; // expected-warning{{excess elements in vector initializer}} float4 array[] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0}; -int array_sizecheck[(sizeof(array) / sizeof(float4)) == 3? 1 : -1]; +int array_sizecheck[(sizeof(array) / sizeof(float4)) == 3 ? 1 : -1]; float4 array2[2] = { 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0 }; // expected-warning {{excess elements in array initializer}} @@ -26,5 +26,5 @@ float f1(void) { // PR5265 typedef float __attribute__((ext_vector_type (3))) float3; -int test2[(sizeof(float3) == sizeof(float4))*2-1]; +int test2[sizeof(float3) == sizeof(float4) ? 1 : -1]; |