[Bug c++/110619] Dangling pointer returned from constexpr function converts in nullptr

2023-08-07 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110619 --- Comment #9 from Jonathan Wakely --- (In reply to Fedor Chelnokov from comment #8) > This program must be rejected because of relational comparison of unrelated > pointers I disagree. If GCC were to define the behaviour of returning invalid

[Bug c++/110619] Dangling pointer returned from constexpr function converts in nullptr

2023-08-07 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110619 --- Comment #8 from Fedor Chelnokov --- Please note that GCC 13 also accepts invalid program (because dangling pointers were converted in nullptr): constexpr auto f(int a) { return } constexpr auto g(int b) { return }

[Bug c++/110619] Dangling pointer returned from constexpr function converts in nullptr

2023-08-06 Thread peter at cordes dot ca via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110619 Peter Cordes changed: What|Removed |Added CC||peter at cordes dot ca --- Comment #7

[Bug c++/110619] Dangling pointer returned from constexpr function converts in nullptr

2023-07-25 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110619 --- Comment #6 from CVS Commits --- The trunk branch has been updated by Jason Merrill : https://gcc.gnu.org/g:b8266af71c19a0bd7db4d08c8d2ee3c33214508c commit r14-2772-gb8266af71c19a0bd7db4d08c8d2ee3c33214508c Author: Nathaniel Shead Date:

[Bug c++/110619] Dangling pointer returned from constexpr function converts in nullptr

2023-07-13 Thread ppalka at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110619 Patrick Palka changed: What|Removed |Added CC||natattak at gmail dot com,

[Bug c++/110619] Dangling pointer returned from constexpr function converts in nullptr

2023-07-11 Thread de34 at live dot cn via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110619 Jiang An changed: What|Removed |Added CC||de34 at live dot cn --- Comment #4 from

[Bug c++/110619] Dangling pointer returned from constexpr function converts in nullptr

2023-07-10 Thread fchelnokov at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110619 --- Comment #3 from Fedor Chelnokov --- I think according to https://eel.is/c++draft/basic.stc#general-4 the function shall return an "invalid pointer valued". And nullptr is not considered such. And if one modifies the function slightly (see

[Bug c++/110619] Dangling pointer returned from constexpr function converts in nullptr

2023-07-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110619 --- Comment #2 from Andrew Pinski --- >but it is not nullptr. Or is it just undefined so it could be considered a nullptr ...

[Bug c++/110619] Dangling pointer returned from constexpr function converts in nullptr

2023-07-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110619 Andrew Pinski changed: What|Removed |Added Keywords||diagnostic --- Comment #1 from Andrew