gcc/testsuite/c-c++-common/Wattributes-3.c
raw| 1 | /* PR c++/113674 */ |
| 2 | /* { dg-do compile { target { c || c++11 } } } */ |
| 3 | /* { dg-options "" } */ |
| 4 | |
| 5 | [[____noreturn____]] int foo (int i) /* { dg-warning "'__noreturn__' attribute (directive )?ignored" } */ |
| 6 | { |
| 7 | return i; |
| 8 | } |
| 9 | |
| 10 | [[____maybe_unused____]] int bar (int i) /* { dg-warning "'__maybe_unused__' attribute (directive )?ignored" } */ |
| 11 | { |
| 12 | return i; |
| 13 | } |