aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8.1/gcc/testsuite/g++.dg/cpp0x/gen-attrs-36-1.C
blob: 2aae9cae00b4caed090ba4d8eaa203adf90460a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
// { dg-do compile { target c++11 } }

struct S;

typedef int (*F [[gnu::warn_unused_result]]) (int);

typedef int (*F2 [[gnu::warn_unused_result]]) (int);

typedef int (S::*F3 [[gnu::warn_unused_result]]) (int); // { dg-warning "only applies to function types" }

typedef int [[gnu::warn_unused_result]] (*F5) (int); // { dg-warning "ignored" }