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: [Testsuite] Fix non-portable builtins tests (Solaris)


In http://gcc.gnu.org/ml/gcc-patches/2003-10/msg01607.html
Eric Botcazou wrote:
> 2003-10-19  Eric Botcazou  <ebotcazou@libertysurf.fr>
>
>	* gcc.dg/builtins-18.c: Wrap C99 tests with HAVE_C99_RUNTIME.
>	Define HAVE_C99_RUNTIME except on Solaris.
>	* gcc.dg/builtins-20.c: Likewise.

Ok.

I submitted an alternate solution to this problem back in June,
http://gcc.gnu.org/ml/gcc-patches/2003-06/msg01531.html that moved
the problematic tests into their own files.  But consensus was
never reached on how best to specify platforms with C99 functions.

One tweak you might consider is using two macros, HAVE_C99L_RUNTIME
and HAVE_C99F_RUNTIME, that control the float and long double tests
independently.  That way Solaris defines neither, but targets such
as Darwin can atleast still test the "float" forms.

i.e.
+ /* These platforms don't have complete C99 float runtimes. */
+ #if !defined(sun)
+ #define HAVE_C99F_RUNTIME
+ #endif
+
+ /* These platforms don't have complete C99 long double runtimes.  */
+ #if !defined(sun)
+ #define HAVE_C99L_RUNTIME
+ #endif


Sound reasonable?

Roger
--


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