public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Jason Merrill <jason@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] c++, v3: Add support for __real__/__imag__ modifications in constant expressions [PR88174]
Date: Tue, 5 Jul 2022 22:57:20 +0200	[thread overview]
Message-ID: <YsSlsKGnG+bn3U55@tucnak> (raw)
In-Reply-To: <fd2728c6-a11f-0d54-0402-988dde018633@redhat.com>

On Tue, Jul 05, 2022 at 04:44:41PM -0400, Jason Merrill wrote:
> On 7/4/22 11:50, Jakub Jelinek wrote:
> > On Mon, Jun 27, 2022 at 06:31:18PM +0200, Jakub Jelinek via Gcc-patches wrote:
> 
> > > > Hmm, why do we need to handle complex in the !preeval case?  I'd think we
> > > > want to preevaluate all complex values or components thereof.
> 
> > > Because the late evaluation of the initializer could have touched
> > > the destination, so we need to reevaluate it.
> > > Same reason why we call get_or_insert_ctor_field again in the second
> > > loop as we call it in the first loop.
> 
> But preeval should always be true, so we'd never reach the new handling in
> the if (!preeval) block.  Certainly the new testcase doesn't exercise this
> code.

Ah, you're right, in the complex case SCALAR_TYPE_P (type) has to be true
because it is COMPLEX_TYPE and so preeval must be true.
I'll rework the patch then.

	Jakub


  reply	other threads:[~2022-07-05 20:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-09  8:37 [PATCH] c++: " Jakub Jelinek
2022-06-10 17:27 ` Jason Merrill
2022-06-10 19:57   ` Jakub Jelinek
2022-06-17 17:06     ` [PATCH] c++, v2: " Jakub Jelinek
2022-06-20 20:03       ` Jason Merrill
2022-06-27 16:31         ` Jakub Jelinek
2022-07-04 15:50           ` [PATCH] c++, v3: " Jakub Jelinek
2022-07-05 20:44             ` Jason Merrill
2022-07-05 20:57               ` Jakub Jelinek [this message]
2022-07-27  9:09               ` [PATCH] c++, v4: " Jakub Jelinek
2022-08-06 22:41                 ` 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=YsSlsKGnG+bn3U55@tucnak \
    --to=jakub@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).