This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug java/31365] New: private methods given vtable slots
- From: "tromey at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 26 Mar 2007 16:06:28 -0000
- Subject: [Bug java/31365] New: private methods given vtable slots
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Right now gcj will make a vtable slot for a non-static private method.
We speculate that this is done for CNI.
However, there's no point to a private method having a vtable slot,
since private methods are never inherited. Ideally both gcj and g++
would emit calls to private methods directly (not via the vtable).
This may mean that private methods will have to check for this==null,
or perhaps their callers will (the latter may be preferable since most
calls will be on 'this', and thus the check can be removed).
link.cc already omits private methods from the constructed vtables.
--
Summary: private methods given vtable slots
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tromey at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31365