This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix class type lookup from OBJ_TYPE_REF
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Mike Stump <mikestump at comcast dot net>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, David Edelsohn <dje dot gcc at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Biener <rguenther at suse dot de>, Jason Merrill <jason at redhat dot com>, martin jambor <mjambor at suse dot cz>, stanshebs at earthlink dot net
- Date: Mon, 19 Aug 2013 11:04:01 +0200
- Subject: Re: Fix class type lookup from OBJ_TYPE_REF
- References: <CAGWvnymPF5w9eqh2hctOK0hTw-0maWi76PAzVUQHPU-EzU-zEg at mail dot gmail dot com> <20130817155403 dot GD20005 at kam dot mff dot cuni dot cz> <B62A8D4D-93F6-4EA8-A743-221F31D892C8 at comcast dot net>
> On Aug 17, 2013, at 8:54 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> > Moreover objc apparently never produce any virtual functions/methods.
>
> Objective-C++ might. :-)
Sure, those ought to be regular C++ methods though.
>
> > Can someone explain me in greater detail how the objc use works?
>
> Objective-C uses it to manage code generation for post-increments of method calls that involve a castâ in greater detail, no, that's just from a quick read of the code.
OK, the real question is what objective-C expects middle end to do with OBJ_TYPE_REF.
If it expects it to do some optimization, it is probably wrong, since I am not aware
of any OBJ_TYPE_REF code that will work on types w/o virtual tables.
If it expects to do nothing, I guess we ought to drop it at gimplification time.
Honza