public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Jason Merrill <jason@redhat.com>, Martin Sebor <msebor@gmail.com>,
	       Gcc Patch List <gcc-patches@gcc.gnu.org>
Cc: Marek Polacek <polacek@redhat.com>, Jakub Jelinek <jakub@redhat.com>
Subject: Re: [PATCH] c++/67376 Comparison with pointer to past-the-end, of array fails inside constant expression
Date: Mon, 21 Mar 2016 22:13:00 -0000	[thread overview]
Message-ID: <56F07137.1050400@redhat.com> (raw)
In-Reply-To: <56F03567.8040306@redhat.com>

On 03/21/2016 11:54 AM, Jason Merrill wrote:
>>> Both b0 and b1 are invalid and should be diagnosed, but only b1
>>> is.  b1 isn't because because by the time we see its initializer
>>> in constexpr.c it's been transformed into the equivalent of "b1
>>> = (int*)ps" (though we don't see the cast which would also make
>>> it invalid).
>>>
>>> But if we can avoid these early simplifying transformations and
>>> retain a more faithful representation of the original source then
>>> doing the checking later will likely be simpler and result in
>>> detecting more problems with greater consistency and less effort.
>> Do we know where the folding is happening for this case and is it
>> something we can reasonably defer?    ie, is this just a case we missed
>> as part of the deferred folding work and hence should have its own
>> distinct BZ to track?
>
> Yes, why is it already folded?
Let's pull that out into a separate BZ and tackle it for gcc-7.

jeff

  reply	other threads:[~2016-03-21 22:10 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-14 21:25 Martin Sebor
2016-03-14 22:13 ` Jakub Jelinek
2016-03-16 19:38   ` Jeff Law
2016-03-16 22:53     ` Jakub Jelinek
2016-03-16 19:53 ` Jeff Law
2016-03-17 21:35   ` Martin Sebor
2016-03-18 17:48     ` Jeff Law
2016-03-21 17:55       ` Jason Merrill
2016-03-21 22:13         ` Jeff Law [this message]
2016-03-22 19:10           ` Jason Merrill
2016-03-22 20:38             ` Martin Sebor
2016-03-23 20:41               ` Jason Merrill
2016-03-28 23:20                 ` Martin Sebor
2016-03-29 19:07                   ` Jason Merrill
2016-03-30  5:56                     ` Martin Sebor
2016-03-30 16:02                       ` Jason Merrill
2016-03-30 16:58                         ` Martin Sebor
2016-03-30 20:19                           ` Jason Merrill
2016-03-30 23:09                             ` Martin Sebor
2016-03-31  8:48                               ` Jason Merrill
2016-03-31 19:30                                 ` Martin Sebor
2016-03-31 20:07                                   ` Jason Merrill
2016-05-31 20:33                                     ` Martin Sebor
2016-05-31 20:48                                       ` Jason Merrill
2016-03-31 17:53                             ` Jeff Law
2016-03-18 19:13     ` Jeff Law

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=56F07137.1050400@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=jason@redhat.com \
    --cc=msebor@gmail.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).