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++.other/] [overload14.C] - Rev 305
Compare with Previous | Blame | View Log
// { dg-do run }
// { dg-options "-Wconversion" }
extern "C" void abort();
struct A {
typedef double (&B);
typedef const double (&C);
A() { }
operator C () const;
operator B ();
};
static const double d = 2.0;
static double e = 3.0;
A::operator A::C () const
{
abort ();
return d;
}
A::operator A::B ()
{
return e;
}
int main ()
{
(A::C) A ();
return 0;
}