Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/gnu2x-attr-syntax-2.c @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | |
children |
line wrap: on
line source
/* Test C2x attribute syntax. Invalid uses of attributes with GNU C features. */ /* { dg-do compile } */ /* { dg-options "-std=gnu2x -w" } */ /* Attributes cannot be used as prefix attributes on old-style parameter declarations or on function declarators with identifier lists (removed from C2x). */ void (*f(a, b) [[]])() int a, b; { } /* { dg-error "expected" } */ void f(x, y) int x; [[]] int y; { } /* { dg-error "expected" } */ /* Nonempty attributes cannot be used as postfix attributes with __auto_type. */ __auto_type [[gnu::no_such_attr]] x = 1; /* { dg-error "'__auto_type' followed by" } */