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?


> 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


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