This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Why does casting a function generate a run-time abort?
- From: Richard Henderson <rth at redhat dot com>
- To: Ziemowit Laski <zlaski at apple dot com>
- Cc: gcc List <gcc at gcc dot gnu dot org>
- Date: Fri, 18 Jun 2004 13:23:14 -0700
- Subject: Re: Why does casting a function generate a run-time abort?
- References: <E1A38466-C0CA-11D8-8A1D-000393673036@apple.com>
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~