public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [C++ PATCH] Fix __builtin_{is_constant_evaluated,constant_p} handling in static_assert (PR c++/86524, PR c++/88446, take 2)
Date: Fri, 21 Dec 2018 19:31:00 -0000	[thread overview]
Message-ID: <1fa985da-e362-4d1d-c05c-33dca08b26b2@redhat.com> (raw)
In-Reply-To: <20181221085141.GV23305@tucnak>

On 12/21/18 3:51 AM, Jakub Jelinek wrote:
> On Thu, Dec 20, 2018 at 09:49:39PM -0500, Jason Merrill wrote:
>>> But if we need cp_fully_fold, doesn't that mean that the earlier
>>> cxx_eval_constant_expression failed and thus the argument is not a constant
>>> expression?  Should __builtin_is_constant_evaluated () evaluate to true
>>> even if the argument is not a constant expression?
>>
>> Ah, no, good point.
>>
>>> Is there a reason to call that maybe_constant_value at all when we've called
>>> cxx_eval_constant_expression first?  Wouldn't cp_fold_rvalue (or
>>> c_fully_fold with false as last argument) be sufficient there?
>>
>> I think that would be better, yes.
> 
> As cp_fold_rvalue* is static in cp-gimplify.c, I've used c_fully_fold
> (or do you want to export cp_fold_rvalue*?).

Let's export it.  OK with that change.

Jason

      reply	other threads:[~2018-12-21 19:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-12 22:30 [C++ PATCH] Fix __builtin_{is_constant_evaluated,constant_p} handling in static_assert (PR c++/86524, PR c++/88446) Jakub Jelinek
2018-12-19 10:19 ` Patch ping (Re: [C++ PATCH] Fix __builtin_{is_constant_evaluated,constant_p} handling in static_assert (PR c++/86524, PR c++/88446)) Jakub Jelinek
2018-12-20 19:49 ` [C++ PATCH] Fix __builtin_{is_constant_evaluated,constant_p} handling in static_assert (PR c++/86524, PR c++/88446) Jason Merrill
2018-12-20 21:26   ` Jakub Jelinek
2018-12-20 21:28     ` Jason Merrill
2018-12-20 21:43       ` Jakub Jelinek
2018-12-20 21:47         ` Jason Merrill
2018-12-20 22:41           ` Jakub Jelinek
2018-12-21  2:51             ` Jason Merrill
2018-12-21  9:05               ` [C++ PATCH] Fix __builtin_{is_constant_evaluated,constant_p} handling in static_assert (PR c++/86524, PR c++/88446, take 2) Jakub Jelinek
2018-12-21 19:31                 ` Jason Merrill [this message]

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=1fa985da-e362-4d1d-c05c-33dca08b26b2@redhat.com \
    --to=jason@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@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).