[PATCH][C][C++] Move (some) error handling from builtins.c to the frontends
Joseph S. Myers
joseph@codesourcery.com
Wed Apr 23 16:34:00 GMT 2008
On Wed, 23 Apr 2008, Richard Guenther wrote:
> This moves type and argument count checking for type-generic math builtins
> from builtins.c (at fold time) to a helper in c-common which is called
> at the time the function call is built.
>
> Originally this patch was motivated because __builtin_constant_p accepts
> any number of arguments but only expects / processes one. This is now
> verified in the same place.
>
> This function may be also used to properly implement type-generic math
> which requires promotion and possibly enables more error handling to be
> moved from builtins.c to the frontends (at least those parts that do
> not depend on constant propagation to be done before).
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu -- does this look
> sensible or do we not care?
It looks sensible to me in C terms.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Gcc-patches
mailing list