URL
https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
// { dg-do compile }
|
// { dg-do compile }
|
|
|
// Copyright (C) 2003 Free Software Foundation, Inc.
|
// Copyright (C) 2003 Free Software Foundation, Inc.
|
// Contributed by Nathan Sidwell 20 Apr 2003
|
// Contributed by Nathan Sidwell 20 Apr 2003
|
|
|
// PR 10337, unneeded warning
|
// PR 10337, unneeded warning
|
|
|
class A {
|
class A {
|
public:
|
public:
|
A() {}
|
A() {}
|
};
|
};
|
|
|
class B : public A {
|
class B : public A {
|
public:
|
public:
|
B() {}
|
B() {}
|
void operator=(const A& b) {}
|
void operator=(const A& b) {}
|
void operator=(const B& b) {}
|
void operator=(const B& b) {}
|
};
|
};
|
|
|
class C {
|
class C {
|
public:
|
public:
|
C() {}
|
C() {}
|
operator B &() { return _b; }
|
operator B &() { return _b; }
|
operator const B &() const { return _b; }
|
operator const B &() const { return _b; }
|
|
|
B _b;
|
B _b;
|
};
|
};
|
|
|
int main() {
|
int main() {
|
B b;
|
B b;
|
C c;
|
C c;
|
b = c;
|
b = c;
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.