gcc/testsuite/gcc.dg/gnu23-attr-syntax-1.c
raw| 1 | /* Test C23 attribute syntax. Basic tests of valid uses of empty |
| 2 | attributes with GNU C features. */ |
| 3 | /* { dg-do compile } */ |
| 4 | /* { dg-options "-std=gnu23" } */ |
| 5 | |
| 6 | /* Attributes can be used in declarations after __extension__, and |
| 7 | before asm statements. */ |
| 8 | |
| 9 | __extension__ [[]] int a; |
| 10 | |
| 11 | void |
| 12 | f (void) |
| 13 | { |
| 14 | __extension__ [[]] int b; |
| 15 | [[]] asm (""); |
| 16 | } |