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
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
}
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110619
Peter Cordes changed:
What|Removed |Added
CC||peter at cordes dot ca
--- Comment #7
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:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110619
Patrick Palka changed:
What|Removed |Added
CC||natattak at gmail dot com,
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
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
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 ...
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110619
Andrew Pinski changed:
What|Removed |Added
Keywords||diagnostic
--- Comment #1 from Andrew