OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.martin/] [sts_conv.C] - Rev 305

Compare with Previous | Blame | View Log

// { dg-do run  }
// ecgs-bugs 1999-02-22 14:21, Stefan Schwarzer 
// sts@ica1.uni-stuttgart.de
// this code should compile quietly

class CArray 
{
public:
  operator double* (){ return a; }
  // works if we comment this line:
  operator double* () const { return const_cast<double *>(a); }
private:   
  double      a[2];   
};

int main(){
  CArray  a;
  double *pa = a + 1; // { dg-bogus "" } should convert
  return 0; 
}

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.