blob: d63f9cd97c482b87e879980b4c8e5bf2648bc9f1 [file] [log] [blame]
Eli Friedmand5740522008-02-15 06:03:44 +00001/* RUN: clang %s -fsyntax-only -pedantic -verify
2 */
3
4extern struct {int a;} x; // expected-error{{previous definition is here}}
5extern struct {int a;} x; // expected-error{{redefinition of 'x'}}
6
7struct x;
8int a(struct x* b) {
9// FIXME: This test currently fails
10// Per C99 6.7.2.3, since the outer and inner "struct x"es have different
11// scopes, they don't refer to the same type, and are therefore incompatible
12struct x {int a;} *c = b;
13}
14
15struct x {int a;} r;
16int b() {
17// FIXME: This test currently also fails
18struct x {char x;} s = r;
19}