[Bug c++/103780] zero pointer is considered true

2021-12-21 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103780 --- Comment #4 from Jonathan Wakely --- Yes that's the nature of undefined behaviour. It might have surprising results. Don't write code with undefined behaviour. The FIXED resolution means a bug in GCC was fixed, not that your problem has been

[Bug c++/103780] zero pointer is considered true

2021-12-20 Thread schwab--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103780 Andreas Schwab changed: What|Removed |Added Resolution|FIXED |INVALID

[Bug c++/103780] zero pointer is considered true

2021-12-20 Thread lucfety at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103780 Luc FETY changed: What|Removed |Added Resolution|INVALID |FIXED --- Comment #3 from Luc FETY --- (In

[Bug c++/103780] zero pointer is considered true

2021-12-20 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103780 --- Comment #2 from Jonathan Wakely --- It is undefined to decrement a pointer to point before an object.

[Bug c++/103780] zero pointer is considered true

2021-12-20 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103780 Andrew Pinski changed: What|Removed |Added Resolution|--- |INVALID Status|UNCONFIRMED