]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
struct-layout-1_x1.h: Add __SIZE_TYPE__ cast to avoid pointer truncation warning.
authorKai Tietz <kai.tietz@onevision.com>
Fri, 26 Sep 2008 08:08:38 +0000 (08:08 +0000)
committerKai Tietz <ktietz@gcc.gnu.org>
Fri, 26 Sep 2008 08:08:38 +0000 (10:08 +0200)
2008-09-26  Kai Tietz  <kai.tietz@onevision.com>

* g++.dg/compat/struct-layout-1_x1.h: Add __SIZE_TYPE__ cast
to avoid pointer truncation warning.

From-SVN: r140686

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/compat/struct-layout-1_x1.h

index abada3406c5dc5cf8dcab1dac8611c813f309b8f..499e7c0ab7b7cb0eddffa7ab79fb0693b431c939 100644 (file)
@@ -1,3 +1,8 @@
+2008-09-26  Kai Tietz  <kai.tietz@onevision.com>
+
+       * g++.dg/compat/struct-layout-1_x1.h: Add __SIZE_TYPE__ cast
+       to avoid pointer truncation warning.
+
 2008-09-26  Dorit Nuzman  <dorit@il.ibm.com>
        
        PR tree-optimization/37574
index 0c7696fa7dbe65f4a55fe37b82b8839d9a4fa906..e14433e0326f843448240fe9e938ea9b83622dbb 100644 (file)
@@ -56,7 +56,7 @@ void test##n (void)                                           \
   info.als = __alignof__ (s##n);                               \
   info.ala0 = __alignof__ (a##n[0]);                           \
   info.ala3 = __alignof__ (a##n[3]);                           \
-  if (((long) &a##n[3]) & (info.als - 1))                      \
+  if (((long) (__SIZE_TYPE__) &a##n[3]) & (info.als - 1))                      \
     FAIL (n, 1);                                               \
   i = 0; j = 0;                                                        \
   ops                                                          \