This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/14688] Mis-matched calling convention on virtual functions accepted without error
- From: "massimiliano dot ghilardi at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Nov 2006 14:04:44 -0000
- Subject: [Bug c++/14688] Mis-matched calling convention on virtual functions accepted without error
- References: <bug-14688-4066@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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