aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2023-01-25 00:12:46 +0100
committerJakub Jelinek <jakub@redhat.com>2023-01-25 00:12:46 +0100
commitaba6416e95ab4138a0ecab0fd51e7e9329d74a45 (patch)
treeccc2a45ad6b7a279ff3063773f90c9410a028c75
parentf235d695729cc745cf15a00fb8b2cfaded80fd1e (diff)
downloadgcc-aba6416e95ab4138a0ecab0fd51e7e9329d74a45.zip
gcc-aba6416e95ab4138a0ecab0fd51e7e9329d74a45.tar.gz
gcc-aba6416e95ab4138a0ecab0fd51e7e9329d74a45.tar.bz2
testsuite: Fix up new51.C test on various targets [PR108533]
The test fails on targets where size_t is not unsigned long due to extra diagnostics. As the testcase is tested in C++98 too, I'm not using decltype (sizeof 0) but __SIZE_TYPE__. 2023-01-25 Jakub Jelinek <jakub@redhat.com> PR c++/107329 PR testsuite/108533 * g++.dg/init/new51.C (size_t): New typedef. (RexxClass::operator new, RexxClass::operator delete): Use size_t instead of unsigned long.
-rw-r--r--gcc/testsuite/g++.dg/init/new51.C5
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/testsuite/g++.dg/init/new51.C b/gcc/testsuite/g++.dg/init/new51.C
index d8b3364..89c0f87 100644
--- a/gcc/testsuite/g++.dg/init/new51.C
+++ b/gcc/testsuite/g++.dg/init/new51.C
@@ -1,9 +1,10 @@
// PR c++/107329
+typedef __SIZE_TYPE__ size_t;
struct RexxClass {
- void *operator new(unsigned long, unsigned long, const char *, RexxClass *,
+ void *operator new(size_t, size_t, const char *, RexxClass *,
RexxClass *);
- void operator delete(void *, unsigned long, const char *, RexxClass *,
+ void operator delete(void *, size_t, const char *, RexxClass *,
RexxClass *);
RexxClass();
};