This is the mail archive of the gcc-patches@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: [RFA:] fix lack of #ifdef HAVE_C99_RUNTIME in builtins-20.c and elsewhere


On Sun, 18 Mar 2007, Hans-Peter Nilsson wrote:

> 	* gcc.dg/builtins-59.c, gcc.dg/builtins-61.c,
> 	gcc.dg/builtins-62.c: Require c99_math.
> 	* gcc.dg/builtins-20.c (test3f, test3l): Wrap cargf, cargl, atan2f
> 	and atan2l test in #ifdef HAVE_C99_RUNTIME.
> 	* lib/target-supports.exp (check_effective_target_c99_math): New.

> +# Return 1 if the target has c99 math functions as implied by
> +# the target macro TARGET_C99_FUNCTIONS.
> +
> +proc check_effective_target_c99_math { } {
> +    global srcdir
> +    return [check_no_compiler_messages c99_math assembly {
> +	#include "builtins-config.h"
> +	#ifndef HAVE_C99_RUNTIME
> +	#error "No HAVE_C99_RUNTIME"
> +	#endif
> +    } -I$srcdir/gcc.dg ]
> +}

I'm not sure this bit is right.  Certain targets (solaris, darwin?)
require special flags to compile builtins-config.h cleanly and activate
C99 mode.  With your test, they will fail this check and bypass any test
marked with c99_math.

Is there a way to just use the existing idiom in all the tests by wrapping
the offending code with HAVE_C99_RUNTIME and avoid the new "target
supports" check?

		--Kaveh
--
Kaveh R. Ghazi			ghazi@caip.rutgers.edu


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