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?


> 
> Ziemowit Laski <zlaski@apple.com> writes:
> 
> > Right; there is an ugly 'if(!c_dialect_objc())' in front of the whole
> > thing.  Although I do see that an abort is indeed permitted under the
> > circumstances, I'm still mystified as to why this became an issue in
> > the first place.  Why not just construct a function call using the
> > signature specified in the cast?  Aside from not being able to inline
> > the call, I'm not quite sure what the problem is...
> 
> A desire to flush out buggy code that *will* fail on platforms with
> more complicated ABIs, I think, is the main motivation.
> 
> Lemme ask you why Objective-C message dispatch needs this.  It's
> impossible to get "right" on IA64 and a few others.

It is only needed with the NeXT^wApple runtime :) so ...
The GNU runtime does not produce these casts at all and is safe.


Thanks,
Andrew Pinski


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