builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*.
[official-gcc.git] / gcc / testsuite / gcc.dg / c11-noreturn-5.c
blobd1c0949f32ba0e1ffbea39fff010c64d5ff2ea93
1 /* Test C11 _Noreturn. Test invalid uses. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c11 -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" } */