public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/70819] constexpr error location wrong
Date: Sat, 02 Dec 2023 03:33:08 +0000	[thread overview]
Message-ID: <bug-70819-4-XtFbYHfGTt@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-70819-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70819

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |needs-bisection

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
GCC 7-13 does:
```
<source>:17:24:   in constexpr expansion of 'fn7(0, 0)'
<source>:17:43: error: dereferencing a null pointer
 constexpr int n3 = fn7 ((const int *) 0, 0);
                                           ^
<source>:18:24:   in constexpr expansion of 'fn7(0, 8)'
<source>:18:43: error: dereferencing a null pointer
 constexpr int n4 = fn7 ((const int *) 0, 8);
                                           ^
```

While the trunk gives:
```
<source>:17:24:   in 'constexpr' expansion of 'fn7(0, 0)'
<source>:14:14: error: dereferencing a null pointer
   14 |   return fn6 (*a, b);
      |          ~~~~^~~~~~~
<source>:18:24:   in 'constexpr' expansion of 'fn7(0, 8)'
<source>:14:14: error: dereferencing a null pointer
```

Which seems like the correct location now.

       reply	other threads:[~2023-12-02  3:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-70819-4@http.gcc.gnu.org/bugzilla/>
2023-12-02  3:33 ` pinskia at gcc dot gnu.org [this message]
2023-12-04 19:23 ` mpolacek at gcc dot gnu.org

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=bug-70819-4-XtFbYHfGTt@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).