aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/inherit/override-attribs.C
blob: 44a1ea49734465b9274872823e73e355d0b80ae7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// PR c++/14688
// { dg-do compile { target i?86-*-* } }
class one
{
public:
  virtual void
  test(void* value);  // { dg-error "overriding" }
};

class two : public one
{
public:
  void  __attribute__((regparm(2)))
  test(void* value);  // { dg-error "conflicting type attributes"  }
};

class three : public one
{
public:
  void __attribute__ ((cdecl))
  test(void* value);  // OK
};