]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix size_t in id-15.c and infoleak-net-ethtool-ioctl.c for llp64
authorJonathan Yong <10walls@gmail.com>
Thu, 24 Apr 2025 07:42:17 +0000 (07:42 +0000)
committerJonathan Yong <10walls@gmail.com>
Mon, 28 Apr 2025 00:41:54 +0000 (00:41 +0000)
Use __SIZE_TYPE__ for size_t types so that it works for
llp64.

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

* gcc.dg/graphite/id-15.c: Use __SIZE_TYPE__ instead of
unsigned long.
* gcc.dg/plugin/infoleak-net-ethtool-ioctl.c: ditto.

gcc/testsuite/gcc.dg/graphite/id-15.c
gcc/testsuite/gcc.dg/plugin/infoleak-net-ethtool-ioctl.c

index d0a804c876bfedc719bc124a0d24583367c0d5ac..d258ef57688226f3fcf077e9e2c5550d14cd2b6d 100644 (file)
@@ -1,7 +1,7 @@
 /* { dg-additional-options "-Wno-old-style-definition" } */
 /* { dg-require-effective-target int32plus } */
 
-typedef long unsigned int size_t;
+typedef __SIZE_TYPE__ size_t;
 extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
 
 static void
index 52846c40f8638320c0d8678e715397306a40fe2c..afb4a5714e9a19e3f13ee5079fd7c8cdaa040a60 100644 (file)
@@ -11,8 +11,7 @@ typedef unsigned int __u32;
 typedef __s8 s8;
 typedef __u32 u32;
 enum { false = 0, true = 1 };
-typedef unsigned long __kernel_ulong_t;
-typedef __kernel_ulong_t __kernel_size_t;
+typedef __SIZE_TYPE__ __kernel_size_t;
 typedef _Bool bool;
 typedef __kernel_size_t size_t;