public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@redhat.com>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch] 10/n: trans-mem: compiler tests (1 of 3)
Date: Thu, 03 Nov 2011 22:06:00 -0000	[thread overview]
Message-ID: <4EB30988.70107@redhat.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1111032021420.31547@digraph.polyomino.org.uk>

[-- Attachment #1: Type: text/plain, Size: 542 bytes --]

On 11/03/11 15:22, Joseph S. Myers wrote:
> On Thu, 3 Nov 2011, Aldy Hernandez wrote:
>
>> +#if (__SIZEOF_LONG_LONG__ == __SIZEOF_POINTER__)
>> +typedef unsigned long long ptrcast;
>> +#elif (__SIZEOF_LONG__ == __SIZEOF_POINTER__)
>> +typedef unsigned long ptrcast;
>> +#elif (__SIZEOF_INT__ == __SIZEOF_POINTER__)
>> +typedef unsigned int ptrcast;
>> +#else
>> +#error Add target support here
>> +#endif
>
> Using __UINTPTR_TYPE__ (or including<stdint.h>  and using uintptr_t) would
> seem better.
>

Fixed and committed to branch.

Thanks.

[-- Attachment #2: curr --]
[-- Type: text/plain, Size: 1507 bytes --]

	* testsuite/gcc.dg/alias-1.c: Use __UINTPTR_TYPE__.
	* testsuite/gcc.dg/alias-2.c: Use __UINTPTR_TYPE__.

Index: testsuite/gcc.dg/tm/alias-1.c
===================================================================
--- testsuite/gcc.dg/tm/alias-1.c	(revision 180744)
+++ testsuite/gcc.dg/tm/alias-1.c	(working copy)
@@ -1,15 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-fgnu-tm -fdump-tree-ealias -O" } */
 
-#if (__SIZEOF_LONG_LONG__ == __SIZEOF_POINTER__)
-typedef unsigned long long ptrcast;
-#elif (__SIZEOF_LONG__ == __SIZEOF_POINTER__)
-typedef unsigned long ptrcast;
-#elif (__SIZEOF_INT__ == __SIZEOF_POINTER__)
-typedef unsigned int ptrcast;
-#else
-#error Add target support here
-#endif
+typedef __UINTPTR_TYPE__ ptrcast;
 
 #if (__SIZEOF_POINTER__ == 4)
 #define TM_LOAD  __builtin__ITM_RU4
Index: testsuite/gcc.dg/tm/alias-2.c
===================================================================
--- testsuite/gcc.dg/tm/alias-2.c	(revision 180744)
+++ testsuite/gcc.dg/tm/alias-2.c	(working copy)
@@ -1,15 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-fgnu-tm -fdump-tree-ealias -O" } */
 
-#if (__SIZEOF_LONG_LONG__ == __SIZEOF_POINTER__)
-typedef unsigned long long ptrcast;
-#elif (__SIZEOF_LONG__ == __SIZEOF_POINTER__)
-typedef unsigned long ptrcast;
-#elif (__SIZEOF_INT__ == __SIZEOF_POINTER__)
-typedef unsigned int ptrcast;
-#else
-#error Add target support here
-#endif
+typedef __UINTPTR_TYPE__ ptrcast;
 
 #if (__SIZEOF_POINTER__ == 4)
 #define TM_LOAD  __builtin__ITM_RU4

      reply	other threads:[~2011-11-03 21:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-03 18:37 Aldy Hernandez
2011-11-03 20:33 ` Joseph S. Myers
2011-11-03 22:06   ` Aldy Hernandez [this message]

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=4EB30988.70107@redhat.com \
    --to=aldyh@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    /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).