URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [c1x-anon-struct-2.c] - Rev 701
Go to most recent revision | Compare with Previous | Blame | View Log
/* Test for anonymous structures and unions in C1X. Test for invalid cases. */ /* { dg-do compile } */ /* { dg-options "-std=c1x -pedantic-errors" } */ typedef struct s0 { int i; } s0; struct s1 { int a; struct s0; /* { dg-error "declaration does not declare anything" } */ }; struct s2 { int a; s0; /* { dg-error "declaration does not declare anything" } */ }; struct s3 { struct { int i; }; struct { int i; /* { dg-error "duplicate member" } */ }; }; struct s4 { int a; struct s { int i; }; /* { dg-error "declaration does not declare anything" } */ }; struct s5 { struct { int i; } a; int b; } x; void f (void) { x.i = 0; /* { dg-error "has no member" } */ }
Go to most recent revision | Compare with Previous | Blame | View Log