Add new test to verify that the array index, limit, and stride are
[official-gcc.git] / gcc / testsuite / gcc.dg / c1x-noreturn-5.c
blob73f22165cb051a1c18fcff67bbc645c8a929645d
1 /* Test C1X _Noreturn. Test invalid uses. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c1x -pedantic-errors" } */
5 _Noreturn struct s; /* { dg-error "empty declaration" } */
7 typedef _Noreturn void f (void); /* { dg-error "typedef" } */
9 void g (_Noreturn void fp (void)); /* { dg-error "parameter" } */
11 _Noreturn void (*p) (void); /* { dg-error "variable" } */
13 struct t { int a; _Noreturn void (*f) (void); }; /* { dg-error "expected" } */
15 int *_Noreturn *q; /* { dg-error "expected" } */
17 int i = sizeof (_Noreturn int (*) (void)); /* { dg-error "expected" } */