This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch testsuite g++.dg]: Fix cast of pointer
- From: Kai Tietz <ktietz70 at googlemail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 28 May 2009 19:49:32 +0200
- Subject: [patch testsuite g++.dg]: Fix cast of pointer
Hi,
ChangeLog
2009-05-28 Kai Tietz <kai.tietz@onevision.com>
* g++.dg/torture/pr31579.C: Cast pointer
via __SIZE_TYPE__ instead of 'unsigned long'.
Is this patch ok for apply?
Cheers,
Kai
--
| (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
Index: gcc/gcc/testsuite/g++.dg/torture/pr31579.C
===================================================================
--- gcc.orig/gcc/testsuite/g++.dg/torture/pr31579.C
+++ gcc/gcc/testsuite/g++.dg/torture/pr31579.C
@@ -5,6 +5,6 @@
struct Industry {
unsigned char produced_cargo[2];
};
-unsigned int a = (((unsigned long)&reinterpret_cast<const volatile
+unsigned int a = (((__SIZE_TYPE__)&reinterpret_cast<const volatile
char&>((((Industry*)(char*)8)->produced_cargo[0]))) - 8);