OSDN Git Service

44a1ea49734465b9274872823e73e355d0b80ae7
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / inherit / override-attribs.C
1 // PR c++/14688
2 // { dg-do compile { target i?86-*-* } }
3 class one
4 {
5 public:
6   virtual void
7   test(void* value);  // { dg-error "overriding" }
8 };
9
10 class two : public one
11 {
12 public:
13   void  __attribute__((regparm(2)))
14   test(void* value);  // { dg-error "conflicting type attributes"  }
15 };
16
17 class three : public one
18 {
19 public:
20   void __attribute__ ((cdecl))
21   test(void* value);  // OK
22 };