public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r13-5337] testsuite: Fix up new51.C test on various targets [PR108533]
Date: Tue, 24 Jan 2023 23:14:29 +0000 (GMT)	[thread overview]
Message-ID: <20230124231429.8B8DF3858D1E@sourceware.org> (raw)

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();
 };

                 reply	other threads:[~2023-01-24 23:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230124231429.8B8DF3858D1E@sourceware.org \
    --to=jakub@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).