blob: f23a34b11c54d516eb59cea87ce69ad942ba8f2a [file] [log] [blame]
Seo Sanghyeoneff2cd52009-01-15 04:51:39 +00001// RUN: clang -fsyntax-only -verify -pedantic %s
2
3union u { int i; };
4void f(union u);
5
6void test(int x) {
7 f((union u)x); // expected-warning {{C99 forbids casts to union type}}
8 f((union u)&x); // expected-error {{cast to union type from type 'int *' not present in union}}
9}