gcc/testsuite/g++.dg/cpp0x/gen-attrs-36-1.C
raw| 1 | // { dg-do compile { target c++11 } } |
| 2 | |
| 3 | struct S; |
| 4 | |
| 5 | typedef int (*F [[gnu::warn_unused_result]]) (int); |
| 6 | |
| 7 | typedef int (*F2 [[gnu::warn_unused_result]]) (int); |
| 8 | |
| 9 | typedef int (S::*F3 [[gnu::warn_unused_result]]) (int); |
| 10 | |
| 11 | typedef int [[gnu::warn_unused_result]] (*F5) (int); // { dg-warning "ignored" } |