summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.jason/overload35.C
blob: 7c7db75ca6c64b91b77a04e8161bce2a79dd5384 (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
// { dg-do assemble  }
// PRMS Id: 9647

class castBug
{
public:
   operator int *();
   operator const int *() const;
};

class castBug2
{
public:
   operator const int *() const;
};

void voidfn(void *);

void test()
{
   castBug b;
   castBug2 b2;
   voidfn(b);			// { dg-bogus "" } 
   voidfn(b2);			// { dg-error "" } discarding const
}