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: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: Ziemowit Laski <zlaski at apple dot com>
- Cc: gcc List <gcc at gcc dot gnu dot org>
- Date: Fri, 18 Jun 2004 07:55:56 +0200
- Subject: Re: Why does casting a function generate a run-time abort?
- References: <E1A38466-C0CA-11D8-8A1D-000393673036@apple.com>
> 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