111
|
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 {
|
145
|
12 typedef void (T::* [[gnu::__stdcall__]] F2) (L*); // { dg-warning "only applies to function types" }
|
|
13 typedef void (T::*F) (L*) [[gnu::__stdcall__]];
|
111
|
14 void f(bool aAdd);
|
|
15 };
|
|
16
|
|
17 class T
|
|
18 {
|
|
19 public:
|
145
|
20 virtual void A(L *listener) [[gnu::__stdcall__]] = 0;
|
|
21 virtual void R(L *listener) [[gnu::__stdcall__]] = 0;
|
111
|
22 };
|
|
23 void P::f(bool aAdd)
|
|
24 {
|
|
25 F addRemoveEventListener = (aAdd ? &T::A : &T::R);
|
|
26 }
|