public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-5337] testsuite: Fix up new51.C test on various targets [PR108533]
@ 2023-01-24 23:14 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2023-01-24 23:14 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:aba6416e95ab4138a0ecab0fd51e7e9329d74a45

commit r13-5337-gaba6416e95ab4138a0ecab0fd51e7e9329d74a45
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Wed Jan 25 00:12:46 2023 +0100

    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.

Diff:
---
 gcc/testsuite/g++.dg/init/new51.C | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gcc/testsuite/g++.dg/init/new51.C b/gcc/testsuite/g++.dg/init/new51.C
index d8b336476d9..89c0f87f202 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();
 };

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-01-24 23:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-24 23:14 [gcc r13-5337] testsuite: Fix up new51.C test on various targets [PR108533] Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).