Why does casting a function generate a run-time abort?
Eric Botcazou
ebotcazou@libertysurf.fr
Fri Jun 18 05:56:00 GMT 2004
> Could someone shed some light on this?
The behaviour is undefined in C at run-time (6.3.2.3 §8) so generating an
abort is permitted. This should not trigger in Objective-C (at least that's
how it was written for 3.4).
For the records, Geoff first suggested a compile-time abort, then Joseph
pointed out that this was only undefined at run-time, hence the run-time
abort (modelled on the va_arg stuff).
--
Eric Botcazou
More information about the Gcc
mailing list