aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/cpp0x/gen-attrs-36.C
blob: 3f0ef1461b24dec019974f67c83478ed266271bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// PR c++/43031
// { dg-options "-pedantic" }
// { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } }
// { dg-require-effective-target c++11 }

// c++11 attributes that apply to types are ignored for now

class T;
class L { };
class P : public L
{
  typedef void (T::* [[gnu::__stdcall__]] F2) (L*); // { dg-warning "ignored" }
  typedef void (T::*F) (L*) [[gnu::__stdcall__]]; // { dg-warning "ignored" }
  void f(bool aAdd);
};

class T
{
public:
  virtual void  A(L *listener) [[gnu::__stdcall__]] = 0; // { dg-warning "ignored" }
  virtual void R(L *listener)  [[gnu::__stdcall__]] = 0; // { dg-warning "ignored" }
};
void P::f(bool aAdd)
{
  F addRemoveEventListener = (aAdd ? &T::A : &T::R);
}