This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Fix compat testsuite problems with Sun CC
- From: Eric Botcazou <ebotcazou at libertysurf dot fr>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 30 Jun 2004 23:08:40 +0200
- Subject: Fix compat testsuite problems with Sun CC
There are 2 problems:
- compat-common.h uses '_Complex int' unconditionally and it's a GCC
extension. Fixed by wrapping it up in #ifndef SKIP_COMPLEX_INT/#endif.
- The Sun Studio 8 compiler supports C99 complex types, but apparently
doesn't have <complex.h>. Fixed by testing __SUNPRO_C.
Applied as obvious.
2004-06-30 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.dg/compat/compat-common.h: Wrap up CINT in
an #ifndef SKIP_COMPLEX_INT/#endif pair.
Special-case the Sun compiler wrt to <complex.h>.
--
Eric Botcazou
Index: gcc.dg/compat/compat-common.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/gcc.dg/compat/compat-common.h,v
retrieving revision 1.4
diff -u -r1.4 compat-common.h
--- gcc.dg/compat/compat-common.h 18 Jun 2004 23:18:04 -0000 1.4
+++ gcc.dg/compat/compat-common.h 30 Jun 2004 12:14:56 -0000
@@ -28,8 +28,14 @@
#define CINT(x, y) (x + __extension__ y##i)
#define CDBL(x, y) (x + __extension__ y##i)
#else
+#ifdef __SUNPRO_C
+/* ??? Complex support without <complex.h>. */
+#else
#include <complex.h>
+#endif
+#ifndef SKIP_COMPLEX_INT
#define CINT(x, y) ((_Complex int) (x + y * _Complex_I))
+#endif
#define CDBL(x, y) (x + y * _Complex_I)
#endif