[PATCH][testsuite] Use __SIZE_TYPE__ instead of unsigned long in malloc/memset prototype.
Anatoly Sokolov
aesok@post.ru
Sun Jun 18 13:18:00 GMT 2006
Hello.
gcc.dg/pr18241-1.c, gcc.dg/pr18241-2.c, gcc.dg/20050321-1.c and
gcc.dg/tree-ssa/pr23382.c fails on all platforms where size_t != unsigned
long. Fixed by the following patch.
ChangeLog entry:
2006-06-18 Anatoly Sokolov <aesok@post.ru>
* gcc.dg/pr18241-1.c: Use __SIZE_TYPE__ instead of unsigned long
in malloc prototype.
* gcc.dg/pr18241-2.c: (Ditto.).
* gcc.dg/20050321-1.c: Use __SIZE_TYPE__ instead of unsigned long
in memset prototype.
* gcc.dg/tree-ssa/pr23382.c: (Ditto.).
Index: gcc/testsuite/gcc.dg/pr18241-1.c
===================================================================
--- gcc/testsuite/gcc.dg/pr18241-1.c (revision 114644)
+++ gcc/testsuite/gcc.dg/pr18241-1.c (working copy)
@@ -3,7 +3,7 @@
/* { dg-xfail-if "" { "m32c-*-*" } { "*" } { "" } } */
/* { dg-options "-std=gnu99 -Wall -Wextra -O1" } */
-extern void *memset (void*, int, unsigned long);
+extern void *memset (void*, int, __SIZE_TYPE__);
extern void abort (void);
struct radix_tree_root {
Index: gcc/testsuite/gcc.dg/tree-ssa/pr23382.c
===================================================================
--- gcc/testsuite/gcc.dg/tree-ssa/pr23382.c (revision 114644)
+++ gcc/testsuite/gcc.dg/tree-ssa/pr23382.c (working copy)
@@ -8,7 +8,7 @@
int a1[256];
};
-void *malloc(long size) __attribute__((malloc));
+void *malloc(__SIZE_TYPE__ size) __attribute__((malloc));
void f(void)
{
Index: gcc/testsuite/gcc.dg/20050321-1.c
===================================================================
--- gcc/testsuite/gcc.dg/20050321-1.c (revision 114644)
+++ gcc/testsuite/gcc.dg/20050321-1.c (working copy)
@@ -5,7 +5,7 @@
/* { dg-options "-O2 -fmodulo-sched" } */
/* malloc doesn't take a long. */
/* { dg-xfail-if "" { "m32c-*-*" } { "*" } { "" } } */
-extern void * malloc (long);
+extern void * malloc (__SIZE_TYPE__);
struct s {
int k;
Index: gcc/testsuite/gcc.dg/pr18241-2.c
===================================================================
--- gcc/testsuite/gcc.dg/pr18241-2.c (revision 114644)
+++ gcc/testsuite/gcc.dg/pr18241-2.c (working copy)
@@ -3,7 +3,7 @@
/* { dg-xfail-if "" { "m32c-*-*" } { "*" } { "" } } */
/* { dg-options "-std=gnu99 -Wall -Wextra -O1" } */
-extern void *memset (void*, int, unsigned long);
+extern void *memset (void*, int, __SIZE_TYPE__);
extern void abort (void);
struct radix_tree_root {
Anatoly.
More information about the Gcc-patches
mailing list