public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Marek Polacek <polacek@redhat.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>, Jason Merrill <jason@redhat.com>
Subject: Re: C++ PATCH to implement P1064R0, Virtual Function Calls in Constant Expressions
Date: Fri, 14 Sep 2018 17:41:00 -0000	[thread overview]
Message-ID: <20180914173647.GR8250@tucnak> (raw)
In-Reply-To: <20180914171950.GE5587@redhat.com>

On Fri, Sep 14, 2018 at 01:19:50PM -0400, Marek Polacek wrote:
> +	/* We expect something in the form of &x.D.2103.D.2094; get x. */
> +	if (TREE_CODE (obj) != ADDR_EXPR)
> +	  return t;

Shouldn't it then be a gcc_assert instead, or code like:
	if (TREE_CODE (obj) != ADDR_EXPR)
	  {
	    if (!ctx->quiet)
	      error (...);
	    *non_constant_p = true;
	  }
to make it clear that we haven't handled it and don't consider it a constant
expression?

	Jakub

  reply	other threads:[~2018-09-14 17:36 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-14 17:21 Marek Polacek
2018-09-14 17:41 ` Jakub Jelinek [this message]
2018-09-14 19:43   ` C++ PATCH to implement P1064R0, Virtual Function Calls in Constant Expressions (v2) Marek Polacek
2018-09-14 20:32 ` C++ PATCH to implement P1064R0, Virtual Function Calls in Constant Expressions Jason Merrill
2018-09-14 20:46   ` Marek Polacek
2018-09-17 21:51     ` Marek Polacek
2018-09-18  3:48       ` Jason Merrill
2018-09-18 15:37         ` C++ PATCH to implement P1064R0, Virtual Function Calls in Constant Expressions (v4) Marek Polacek
2018-09-18 18:36           ` Jason Merrill
2018-09-18 18:58             ` Marek Polacek
2018-09-19 13:27               ` Andreas Schwab
2018-09-19 14:19                 ` Marek Polacek
2018-09-19 15:10                   ` Andreas Schwab
2018-09-19 15:11                     ` Marek Polacek
2018-09-19 17:35                       ` Jason Merrill
2018-09-20  8:26                         ` Andreas Schwab
2018-09-20  9:23                           ` Jakub Jelinek
2018-09-27  7:16                             ` Jason Merrill
2018-09-27 23:18                               ` Marek Polacek
2018-09-28  5:44                                 ` Jason Merrill
2018-09-28  6:48                                 ` Jakub Jelinek
2018-12-08  9:07                               ` [C++ PATCH] FIx constexpr virtual function call handling on ia64 (PR c++/87861) Jakub Jelinek
2018-12-11 18:53                                 ` Jason Merrill
2018-10-08 14:18                             ` C++ PATCH to implement P1064R0, Virtual Function Calls in Constant Expressions (v4) Andreas Schwab
2018-10-10 11:53                               ` Jakub Jelinek

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=20180914173647.GR8250@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jason@redhat.com \
    --cc=polacek@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).