diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-4.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-4.C | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-4.C b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-4.C new file mode 100644 index 0000000..eb585a8 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-4.C @@ -0,0 +1,30 @@ +// { dg-options "-Wunused -pedantic-errors" } +// { dg-do compile { target c++11 } } +// Test for syntax support of various attribute permutations. + +int +[[noreturn]] // { dg-warning "ignored" } +one +[[gnu::unused]] +(void); + +int one_third [[noreturn]] [[gnu::unused]] (void); + +int [[gnu::unused]] one_half(); // { dg-warning "ignored" } + +static +[[noreturn]] // { dg-warning "ignored" } +void two [[gnu::unused]] (void) {} + + + +[[gnu::unused]] +int +five(void) +[[noreturn]] // { dg-warning "ignored" } +{} + +[[noreturn]] +void +six (void) +; |