This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/50817] New: G++ emits errors containing lowered vtable references
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 21 Oct 2011 08:16:45 +0000
- Subject: [Bug c++/50817] New: G++ emits errors containing lowered vtable references
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50817
Bug #: 50817
Summary: G++ emits errors containing lowered vtable references
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: manu@gcc.gnu.org
struct a {
virtual int bar();
};
struct foo : public virtual a {
};
void test(foo *P) {
return P->bar() + *P;
}
g++ revision 180166:
void test(foo*)
vtable.cc:9:22: error: no match for âoperator+â in â(((a*)P) +
((sizetype)(*(long int*)(P->foo::<anonymous>.a::_vptr.a +
0xffffffffffffffffffffffffffffffe0u))))->a::bar() + * Pâ
vtable.cc:9:22: error: return-statement with a value, in function returning
'void' [-fpermissive]
clang:
t.cc:9:18: error: invalid operands to binary expression ('int' and 'foo')
return P->bar() + *P;
~~~~~~~~ ^ ~~