]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix up g++.dg/warn/Wuninitialized-32.C test for ilp32 [PR104373]
authorJakub Jelinek <jakub@redhat.com>
Thu, 10 Feb 2022 23:27:11 +0000 (00:27 +0100)
committerJakub Jelinek <jakub@redhat.com>
Thu, 10 Feb 2022 23:27:11 +0000 (00:27 +0100)
The testcase FAILs whenever size_t is not unsigned long:
FAIL: g++.dg/warn/Wuninitialized-32.C  -std=c++98 (test for excess errors)
Excess errors:
.../gcc/testsuite/g++.dg/warn/Wuninitialized-32.C:4:7: error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter [-fpermissive]

Fixed by using __SIZE_TYPE__ instead of unsigned long.

2022-02-11  Jakub Jelinek  <jakub@redhat.com>

PR tree-optimization/104373
* g++.dg/warn/Wuninitialized-32.C (operator new[]): Use __SIZE_TYPE__
as type of the first argument instead of unsigned long.

gcc/testsuite/g++.dg/warn/Wuninitialized-32.C

index 8b02b5c6adbff1bcdb608b422551b163df07ea5d..144a99e0f9385437685f562b1295469432f1b4e9 100644 (file)
@@ -1,7 +1,7 @@
 // { dg-do compile }
 // { dg-additional-options "-Wall" }
 
-void* operator new[](unsigned long, void* __p);
+void* operator new[](__SIZE_TYPE__, void* __p);
 
 struct allocator
 {