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 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);
 

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