public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [pushed] testsuite: fix Wmismatched-new-delete-8.C with -m32
@ 2024-02-22 23:55 Marek Polacek
  2024-02-23  0:06 ` Andrew Pinski
  0 siblings, 1 reply; 3+ messages in thread
From: Marek Polacek @ 2024-02-22 23:55 UTC (permalink / raw)
  To: GCC Patches

Tested x86_64-pc-linux-gnu, applying to trunk.

-- >8 --
This fixes
error: 'operator new' takes type 'size_t' ('unsigned int') as first parameter [-fpermissive]

gcc/testsuite/ChangeLog:

	* g++.dg/warn/Wmismatched-new-delete-8.C: Use __SIZE_TYPE__.
---
 gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-8.C | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-8.C b/gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-8.C
index 0ddc056c6df..e8fd7a85b8c 100644
--- a/gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-8.C
+++ b/gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-8.C
@@ -11,7 +11,7 @@ static inline T * construct_at(void *at, ARGS && args)
  struct Placeable : T
  {
   Placeable(ARGS && args) : T(args) { }
-  void * operator new (long unsigned int, void *ptr) { return ptr; }
+  void * operator new (__SIZE_TYPE__, void *ptr) { return ptr; }
   void operator delete (void *, void *) { }
  };
  return new (at) Placeable(static_cast<ARGS &&>(args));

base-commit: 37127ed975e09813eaa2d1cf1062055fce45dd16
-- 
2.43.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [pushed] testsuite: fix Wmismatched-new-delete-8.C with -m32
  2024-02-22 23:55 [pushed] testsuite: fix Wmismatched-new-delete-8.C with -m32 Marek Polacek
@ 2024-02-23  0:06 ` Andrew Pinski
  2024-02-23  0:09   ` Marek Polacek
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Pinski @ 2024-02-23  0:06 UTC (permalink / raw)
  To: Marek Polacek; +Cc: GCC Patches

[-- Attachment #1: Type: text/plain, Size: 1332 bytes --]

On Thu, Feb 22, 2024, 15:56 Marek Polacek <polacek@redhat.com> wrote:

> Tested x86_64-pc-linux-gnu, applying to trunk.


I backported/pushed the change to 13 branch already so please apply it
there too.

Thanks,
Andrew




> -- >8 --
> This fixes
> error: 'operator new' takes type 'size_t' ('unsigned int') as first
> parameter [-fpermissive]
>
> gcc/testsuite/ChangeLog:
>
>         * g++.dg/warn/Wmismatched-new-delete-8.C: Use __SIZE_TYPE__.
> ---
>  gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-8.C | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-8.C
> b/gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-8.C
> index 0ddc056c6df..e8fd7a85b8c 100644
> --- a/gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-8.C
> +++ b/gcc/testsuite/g++.dg/warn/Wmismatched-new-delete-8.C
> @@ -11,7 +11,7 @@ static inline T * construct_at(void *at, ARGS && args)
>   struct Placeable : T
>   {
>    Placeable(ARGS && args) : T(args) { }
> -  void * operator new (long unsigned int, void *ptr) { return ptr; }
> +  void * operator new (__SIZE_TYPE__, void *ptr) { return ptr; }
>    void operator delete (void *, void *) { }
>   };
>   return new (at) Placeable(static_cast<ARGS &&>(args));
>
> base-commit: 37127ed975e09813eaa2d1cf1062055fce45dd16
> --
> 2.43.2
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [pushed] testsuite: fix Wmismatched-new-delete-8.C with -m32
  2024-02-23  0:06 ` Andrew Pinski
@ 2024-02-23  0:09   ` Marek Polacek
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Polacek @ 2024-02-23  0:09 UTC (permalink / raw)
  To: Andrew Pinski; +Cc: GCC Patches

On Thu, Feb 22, 2024 at 04:06:51PM -0800, Andrew Pinski wrote:
> On Thu, Feb 22, 2024, 15:56 Marek Polacek <polacek@redhat.com> wrote:
> 
> > Tested x86_64-pc-linux-gnu, applying to trunk.
> 
> 
> I backported/pushed the change to 13 branch already so please apply it
> there too.

Ah right.  Done.

Marek


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-23  0:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-22 23:55 [pushed] testsuite: fix Wmismatched-new-delete-8.C with -m32 Marek Polacek
2024-02-23  0:06 ` Andrew Pinski
2024-02-23  0:09   ` Marek Polacek

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).