]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pr65658.c: fix excess warnings on LLP64 targets
authorJonathan Yong <10walls@gmail.com>
Sat, 28 Jan 2023 18:12:50 +0000 (18:12 +0000)
committerJonathan Yong <10walls@gmail.com>
Sat, 11 Feb 2023 08:27:27 +0000 (08:27 +0000)
gcc/testsuite/ChangeLog:

* gcc.dg/pr65658.c: fix LLP64 test.

Signed-off-by: Jonathan Yong <10walls@gmail.com>
gcc/testsuite/gcc.dg/pr65658.c

index bb5c37adbe321da1eaa0ebfe92f21de1d7a394e1..4847dc2d5c72af27397b9ae8af2710ad8458be24 100644 (file)
@@ -16,10 +16,10 @@ struct undeffoo
 };
 struct problem
 {
-  unsigned long l1;
-  unsigned long l2;
-  unsigned long l3;
-  unsigned long l4;
+  __UINTPTR_TYPE__ l1;
+  __UINTPTR_TYPE__ l2;
+  __UINTPTR_TYPE__ l3;
+  __UINTPTR_TYPE__ l4;
 };
 static unsigned int undef1, undef2, undef3, undef4, undef5, undef6;
 static void *undefvp1;
@@ -37,7 +37,7 @@ undefinit1 (void)
 }
 
 static int
-undefinit2 (void *problemp, unsigned long problem)
+undefinit2 (void *problemp, __UINTPTR_TYPE__ problem)
 {
   int ret, u;
   if (undefinit1 ())
@@ -60,7 +60,7 @@ fn6 (struct undefinfo *uip, struct problem *problem)
   unsigned long amt;
   if (external_function3 (((void *) 0), ((void *) 0), &amt, 0, 0))
     return 1;
-  problem->l1 = (unsigned long) undefvp1;
+  problem->l1 = (__UINTPTR_TYPE__) undefvp1;
   problem->l4 = uip->l1;
   problem->l3 = uip->l2;
   return 0;