public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/70819] constexpr error location wrong
       [not found] <bug-70819-4@http.gcc.gnu.org/bugzilla/>
@ 2023-12-02  3:33 ` pinskia at gcc dot gnu.org
  2023-12-04 19:23 ` mpolacek at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-12-02  3:33 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/70819] constexpr error location wrong
       [not found] <bug-70819-4@http.gcc.gnu.org/bugzilla/>
  2023-12-02  3:33 ` [Bug c++/70819] constexpr error location wrong pinskia at gcc dot gnu.org
@ 2023-12-04 19:23 ` mpolacek at gcc dot gnu.org
  1 sibling, 0 replies; 2+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-12-04 19:23 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |mpolacek at gcc dot gnu.org
           Keywords|needs-bisection             |
         Resolution|---                         |FIXED

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Changed in r14-2771

commit 5ebe5bcf8b6b6a0de16737b717e8bd06e4950a14
Author: Nathaniel Shead <nathanieloshead@gmail.com>
Date:   Sun Jul 23 01:13:43 2023 +1000

    c++: Improve location information in constant evaluation

So I guess fixed.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-12-04 19:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-70819-4@http.gcc.gnu.org/bugzilla/>
2023-12-02  3:33 ` [Bug c++/70819] constexpr error location wrong pinskia at gcc dot gnu.org
2023-12-04 19:23 ` mpolacek at gcc dot gnu.org

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).