[Bug c++/14688] Mis-matched calling convention on virtual functions accepted without error
massimiliano dot ghilardi at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Nov 20 14:04:00 GMT 2006
------- Comment #3 from massimiliano dot ghilardi at gmail dot com 2006-11-20 14:04 -------
Duplicated Bug 29909 also points out the not-so-obvious case where the
overridden virtual method is actually the automatically-compiler-generated
derived class destructor:
// compile with g++ -Wall -O
class one {
public:
virtual __attribute((regparm(3))) ~one();
};
class two : public one {
};
int main() {
one * o = new two();
delete
o;
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14688
More information about the Gcc-bugs
mailing list