1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2
f()3 void f() {
4 float v1 = float(1);
5 int v2 = typeof(int)(1,2); // expected-error {{excess elements in scalar initializer}}
6 typedef int arr[];
7 int v3 = arr(); // expected-error {{array types cannot be value-initialized}}
8 typedef void fn_ty();
9 fn_ty(); // expected-error {{function types cannot be value-initialized}}
10 int v4 = int();
11 int v5 = int; // expected-error {{expected '(' for function-style cast or type construction}}
12 typedef int T;
13 int *p;
14 bool v6 = T(0) == p;
15 char *str;
16 str = "a string"; // expected-warning{{conversion from string literal to 'char *' is deprecated}}
17 wchar_t *wstr;
18 wstr = L"a wide string"; // expected-warning{{conversion from string literal to 'wchar_t *' is deprecated}}
19 }
20