1 // RUN: %clang_cc1 -fsyntax-only -verify %s
4 char variable = (void)0;
5 // expected-error@-1{{cannot initialize a variable}}
8 void test1(int x = (void)0) {}
9 // expected-error@-1{{cannot initialize a parameter}}
10 // expected-note@-2{{here}}
14 // expected-error@-1{{cannot initialize return object}}
19 // expected-error@-1{{cannot initialize a member subobject}}
24 int foo[2] = {1, (void)0};
25 // expected-error@-1{{cannot initialize an array element}}
30 // expected-error@-1{{cannot initialize a new value}}
33 typedef short short2 __attribute__ ((__vector_size__ (2)));
35 short2 V = { (void)0 };
36 // expected-error@-1{{cannot initialize a vector element}}
39 typedef float float2 __attribute__((ext_vector_type(2)));
40 typedef float float4 __attribute__((ext_vector_type(4)));
42 void test14(const float2 in, const float2 out) {
43 const float4 V = (float4){ in, out };
44 // expected-error@-1{{cannot initialize a compound literal initializer}}