]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/g++.dg/cpp0x/gen-attrs-36.C
aarch64: Further renaming of generic code
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / cpp0x / gen-attrs-36.C
1 // PR c++/43031
2 // { dg-options "-pedantic" }
3 // { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } }
4 // { dg-require-effective-target c++11 }
5
6 // c++11 attributes that apply to types are ignored for now
7
8 class T;
9 class L { };
10 class P : public L
11 {
12 typedef void (T::* [[gnu::__stdcall__]] F2) (L*); // { dg-warning "only applies to function types" }
13 typedef void (T::*F) (L*) [[gnu::__stdcall__]];
14 void f(bool aAdd);
15 };
16
17 class T
18 {
19 public:
20 virtual void A(L *listener) [[gnu::__stdcall__]] = 0;
21 virtual void R(L *listener) [[gnu::__stdcall__]] = 0;
22 };
23 void P::f(bool aAdd)
24 {
25 F addRemoveEventListener = (aAdd ? &T::A : &T::R);
26 }