OSDN Git Service

New test case
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.martin / sts_conv.C
1 // ecgs-bugs 1999-02-22 14:21, Stefan Schwarzer 
2 // sts@ica1.uni-stuttgart.de
3 // this code should compile quietly
4
5 class CArray 
6 {
7 public:
8   operator double* (){ return a; }
9   // works if we comment this line:
10   operator double* () const { return const_cast<double *>(a); }
11 private:   
12   double      a[2];   
13 };
14
15 int main(){
16   CArray  a;
17   double *pa = a + 1; // gets bogus error - should convert
18   return 0; 
19 }