This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR optimization/12085
On Wed, 17 Dec 2003, Eric Botcazou wrote:
> 2003-12-17 Eric Botcazou <ebotcazou@libertysurf.fr>
>
> PR c/12085
> * c-typeck.c (build_function_call): Issue an error if a
> function is called through an incompatible prototype.
This is runtime undefined behavior (if the function that ends up getting
called at runtime has type incompatible with that used for the call), not
compile-time. So it should be a warning (not pedwarn), optionally with a
trap generated (as for va_arg on bad types); only an error if you can
prove that all possible executions of the program must execute the bad
code.
--
Joseph S. Myers
jsm@polyomino.org.uk