public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Marek Polacek <polacek@redhat.com>
To: Jason Merrill <jason@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [pushed] c++: __integer_pack with class argument [PR111357]
Date: Tue, 12 Sep 2023 13:34:43 -0400	[thread overview]
Message-ID: <ZQChM+3JDOjGhECg@redhat.com> (raw)
In-Reply-To: <20230912172744.1930180-1-jason@redhat.com>

On Tue, Sep 12, 2023 at 01:27:44PM -0400, Jason Merrill via Gcc-patches wrote:
> Tested x86_64-pc-linux-gnu, applying to trunk.
> 
> -- 8< --
> 
> The argument might not already be an integer.
> 
> 	PR c++/111357
> 
> gcc/cp/ChangeLog:
> 
> 	* pt.cc (expand_integer_pack): Convert argument to int.
> 
> gcc/testsuite/ChangeLog:
> 
> 	* g++.dg/ext/integer-pack7.C: New test.
> ---
>  gcc/cp/pt.cc                             |  2 ++
>  gcc/testsuite/g++.dg/ext/integer-pack7.C | 38 ++++++++++++++++++++++++
>  2 files changed, 40 insertions(+)
>  create mode 100644 gcc/testsuite/g++.dg/ext/integer-pack7.C
> 
> diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
> index 838179d5fe3..b583c11eb99 100644
> --- a/gcc/cp/pt.cc
> +++ b/gcc/cp/pt.cc
> @@ -3793,6 +3793,8 @@ expand_integer_pack (tree call, tree args, tsubst_flags_t complain,
>      }
>    else
>      {
> +      hi = perform_implicit_conversion_flags (integer_type_node, hi, complain,
> +					      LOOKUP_IMPLICIT);

FWIW, we have perform_implicit_conversion for this.

Marek


  reply	other threads:[~2023-09-12 17:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-12 17:27 Jason Merrill
2023-09-12 17:34 ` Marek Polacek [this message]
2023-09-12 17:49   ` Jakub Jelinek
2023-09-22 14:35     ` [pushed] c++ __integer_pack conversion again [PR111357] Jason Merrill

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=ZQChM+3JDOjGhECg@redhat.com \
    --to=polacek@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    /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).