URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 338 |
// PRMS Id: 6604
|
// PRMS Id: 6604
|
// Old bug: Scoped constructor call is not properly recognized as a functional cast
|
// Old bug: Scoped constructor call is not properly recognized as a functional cast
|
// But after DR 147 A::A() is a constructor call, not a functional cast.
|
// But after DR 147 A::A() is a constructor call, not a functional cast.
|
|
|
int c;
|
int c;
|
|
|
struct A {
|
struct A {
|
A() { ++c; }
|
A() { ++c; }
|
~A() { --c; }
|
~A() { --c; }
|
operator int () { return 1; }
|
operator int () { return 1; }
|
};
|
};
|
|
|
int main ()
|
int main ()
|
{
|
{
|
A a;
|
A a;
|
a.A::A(); // { dg-error "" }
|
a.A::A(); // { dg-error "" }
|
A::A(); // { dg-message "" }
|
A::A(); // { dg-message "" }
|
return c;
|
return c;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.