This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Fix gcc.dg/builtins-67.c on Solaris 8/9
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 13 Oct 2011 14:24:48 +0200
- Subject: Fix gcc.dg/builtins-67.c on Solaris 8/9
The test fails with a link error, as 'round' and 'rint' are only C99.
Fixed thusly, tested on SPARC/Solaris 8, applied on the mainline as obvious.
2011-10-13 Eric Botcazou <ebotcazou@adacore.com>
* gcc.dg/builtins-67.c: Guard iround and irint with HAVE_C99_RUNTIME.
--
Eric Botcazou
Index: gcc.dg/builtins-67.c
===================================================================
--- gcc.dg/builtins-67.c (revision 179844)
+++ gcc.dg/builtins-67.c (working copy)
@@ -58,14 +58,14 @@ long long llceilf (float a) { return (lo
long long llceill (long double a) { return (long long) ceill (a); }
#endif
-int iround (double a) { return (int) round (a); }
#ifdef HAVE_C99_RUNTIME
+int iround (double a) { return (int) round (a); }
int iroundf (float a) { return (int) roundf (a); }
int iroundl (long double a) { return (int) roundl (a); }
#endif
-int irint (double a) { return (int) rint (a); }
#ifdef HAVE_C99_RUNTIME
+int irint (double a) { return (int) rint (a); }
int irintf (float a) { return (int) rintf (a); }
int irintl (long double a) { return (int) rintl (a); }
#endif