1 // RUN: clang-cc -fsyntax-only -pedantic -verify %s
2 
3 void f() {
4   typedef int T;
5   int x, *px;
6 
7   // Type id.
8   (T())x;    // expected-error {{cast from 'int' to 'T ()'}}
9   (T())+x;   // expected-error {{cast from 'int' to 'T ()'}}
10   (T())*px;  // expected-error {{cast from 'int' to 'T ()'}}
11 
12   // Expression.
13   x = (T());
14   x = (T())/x;
15 
16   typedef int *PT;
17   // Make sure stuff inside the parens are parsed only once (only one warning).
18   x = (PT()[(int){1}]); // expected-warning {{compound literals}}
19 
20   // Special case: empty parens is a call, not an expression
21   struct S{int operator()();};
22   (S())();
23 
24   // FIXME: Special case: "++" is postfix here, not prefix
25   // (S())++;
26 }
27