public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Steve Ellcey <sje@cup.hp.com>
To: gcc-patches@gcc.gnu.org
Subject: [patch, hpux, fixincludes, committed] Fix hpux_stdint_least_fast fixup for HP-UX.
Date: Wed, 21 Oct 2009 17:12:00 -0000	[thread overview]
Message-ID: <200910211702.n9LH2fN28326@lucas.cup.hp.com> (raw)

This patch fixes several C++ library test failures on IA64 HP-UX;
17_intro/headers/c++200x/all_no_exceptions.cc, 
17_intro/headers/c++200x/all_pedantic_errors.cc, and
26_numerics/headers/random/types_std_c++0x.cc.

The problem is that, in 32 bit mode,  we were defining UINT_FAST64_MAX
and UINT_LEAST64_MAX in terms of ULLONG_MAX which is a C99 defined
macro.  The HP-UX header files do not make this symbol visible in C++
which is a problem if the C++ code uses UINT_FAST64_MAX or
UINT_LEAST64_MAX.  The fix is to define these symbols in terms of
__UINT64_MAX__ which GCC defines automatically and avoid the dependence
on ULLONG_MAX.

Tested on IA64 and PA HP-UX with no regressions and checked in.

Steve Ellcey
sje@cup.hp.com


2009-10-21  Steve Ellcey  <sje@cup.hp.com>

	* inclhack.def (hpux_stdint_least_fast): Simplify.
	* fixincl.x: Regenerate.
	* tests/base/stdint.h: Update.


Index: inclhack.def
===================================================================
--- inclhack.def	(revision 153048)
+++ inclhack.def	(working copy)
@@ -2213,16 +2213,9 @@ fix = {
     select    =
         "^[ \t]*#[ \t]*define[ \t]+UINT_(LEAST|FAST)64_MAX[ \t]+ULLONG_MAX";
     c_fix     = format;
-    c-fix-arg = <<- _EOFix_
-	#ifdef __LP64__
-	#  define	UINT_%164_MAX	ULONG_MAX
-	#else
-	%0
-	#endif
-	_EOFix_;
-    test-text = <<- _EOFix_
-	#  define       UINT_FAST64_MAX        ULLONG_MAX
-	#  define       UINT_LEAST64_MAX        ULLONG_MAX
+    c-fix-arg = "#  define	UINT_%164_MAX	__UINT64_MAX__";
+    test-text = "#  define       UINT_FAST64_MAX        ULLONG_MAX\n"
+		"#  define       UINT_LEAST64_MAX        ULLONG_MAX\n";
 	_EOFix_;
 };
 

                 reply	other threads:[~2009-10-21 17:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200910211702.n9LH2fN28326@lucas.cup.hp.com \
    --to=sje@cup.hp.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).