This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why does casting a function generate a run-time abort?


On Thu, Jun 17, 2004 at 06:57:40PM -0700, Ziemowit Laski wrote:
> So, could someone give me some pointers (no pun intended) on how to 
> make the casting of functions into a first-class citizen in the eyes
> of the back-end?

How about a much much better solution -- not casting at all.

You're wanting to do something special with language implementation
internals.  Seems to me that the best solution is to represent this
special as well.

We've been talking about various ways to represent method calls in
C++ and Java such that they can be devirtualized during/after 
optimization.  I wonder if a similar approach can be done here?

For instance, if we added a METHOD_CALL_EXPR to GIMPLE, then we
wouldn't need to expose the objc_msgSend symbol at all at the
tree level; it wouldn't need to show up until we get to rtl.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]