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]

Patch for PR testsuite/31828 (HPPA HP-UX specific target patch)


This patch fixes gcc.dg/float-range-3.c on HPPA HP-UX platforms by
making the FP_* macros visible in C99 mode.  The HP-UX compilers don't
have a C99 mode so the macros are only visible in extended mode.  This
patch makes them visible in extended mode or in GCC's C99 mode.

Tested on HPPA HP-UX.

Dave, does this approach look OK to you?

Steve Ellcey
sje@cup.hp.com



2007-07-04  Steve Ellcey  <sje@cup.hp.com>

	PR testsuite/31828
	inclhack.def (hppa_hpux_fp_macros): New.
	fixincl.x: Regenerate.

Index: inclhack.def
===================================================================
--- inclhack.def	(revision 125317)
+++ inclhack.def	(working copy)
@@ -1558,6 +1558,27 @@ fix = {
 };
 
 
+fix = {
+     hackname  = hppa_hpux_fp_macros;
+     mach      = hppa*-hp-hpux*;
+     files     = math.h;
+     select    = "#[ \t]*define[ \t]*FP_NORMAL.*\n"
+		 "#[ \t]*define[ \t]*FP_ZERO.*\n"
+		 "#[ \t]*define[ \t]*FP_INFINITE.*\n"
+		 "#[ \t]*define[ \t]*FP_SUBNORMAL.*\n"
+		 "#[ \t]*define[ \t]*FP_NAN.*\n";
+     c_fix     = format;
+     c_fix_arg = "#endif /* _INCLUDE_HPUX_SOURCE */\n\n#if defined(_INCLUDE_HPUX_SOURCE) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))\n%0#endif\n\n#ifdef _INCLUDE_HPUX_SOURCE\n";
+
+     test_text =
+            "#  define FP_NORMAL     0\n"
+            "#  define FP_ZERO       1\n"
+            "#  define FP_INFINITE   2\n"
+            "#  define FP_SUBNORMAL  3\n"
+            "#  define FP_NAN        4\n";
+};
+
+
 /*
  *  Fix hpux 10.X missing ctype declarations 1
  */


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