libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / gnu23-attr-syntax-3.c
blobd73d6a3cfa8e85d7e9c761a38ab76bb59b08ae08
1 /* Test C23 attribute syntax. Invalid uses of attributes with GNU C
2 features. Non-permissive variant. */
3 /* { dg-do compile } */
4 /* { dg-options "-std=gnu23 -w" } */
6 /* Attributes cannot be used as prefix attributes on old-style
7 parameter declarations or on function declarators with identifier
8 lists (removed from C23). */
10 void (*f(a, b) [[]])() int a, b; { } /* { dg-error "expected" } */
12 void f(x, y) int x; [[]] int y; { } /* { dg-error "expected" } */
13 /* { dg-error "type of 'y' defaults to 'int'" "" { target *-*-* } .-1 } */
15 /* Nonempty attributes cannot be used as postfix attributes with
16 __auto_type. */
17 __auto_type [[gnu::no_such_attr]] x = 1; /* { dg-error "'__auto_type' followed by" } */