diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/ext/attrib4.C')
-rw-r--r-- | gcc-4.9/gcc/testsuite/g++.dg/ext/attrib4.C | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/ext/attrib4.C b/gcc-4.9/gcc/testsuite/g++.dg/ext/attrib4.C new file mode 100644 index 000000000..68cc74155 --- /dev/null +++ b/gcc-4.9/gcc/testsuite/g++.dg/ext/attrib4.C @@ -0,0 +1,31 @@ +// Test for syntax support of various attribute permutations. + +int +__attribute__((noreturn)) +__attribute__((unused)) +one(void); // OK + +__attribute__((noreturn)) +__attribute__((unused)) +int +two(void); // OK + +int +__attribute__((unused)) +three (void) +__attribute__((noreturn)); // OK + +__attribute__((unused)) +int +four (void) +__attribute__((noreturn)); // OK + +int +five(void) +__attribute__((noreturn)) +__attribute__((unused)); // OK + +__attribute__((noreturn)) +int +__attribute__((unused)) // parse error before '__attribute__' in C++ +six (void); // OK in C |