Why does casting a function generate a run-time abort?
Zack Weinberg
zack@codesourcery.com
Fri Jun 18 07:41:00 GMT 2004
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.
zw
More information about the Gcc
mailing list