This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/25895] New: [4.0/4.1/4.2 Regression] wrong code with ?: and derived class pointers
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Jan 2006 02:34:06 -0000
- Subject: [Bug c++/25895] New: [4.0/4.1/4.2 Regression] wrong code with ?: and derived class pointers
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Testcase:
#include <stdlib.h>
class base {
public:
base() {}
private:
int val_;
};
class derived : public base {
public:
derived() {}
};
bool x = true ? (derived*)0 : (base*)0;
int main ()
{
if (x)
abort();
}
--
Summary: [4.0/4.1/4.2 Regression] wrong code with ?: and derived
class pointers
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25895