[Bug c++/70180] missing -Wpointer-arith on NULL arithmetic cast to a an object type

2019-02-03 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70180 --- Comment #4 from Martin Sebor --- With -Wextra, Clang warns on one of the cases: 70180.cc:3:22: warning: performing pointer arithmetic on a null pointer has undefined behavior if the offset is nonzero [-Wnull-pointer-arithmetic] void *p =

[Bug c++/70180] missing -Wpointer-arith on NULL arithmetic cast to a an object type

2019-02-03 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70180 Martin Sebor changed: What|Removed |Added Known to fail||4.1.3, 4.3.5, 4.4.7, 4.8.5,

[Bug c++/70180] missing -Wpointer-arith on NULL arithmetic cast to a an object type

2018-10-31 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70180 Eric Gallager changed: What|Removed |Added CC||dmalcolm at gcc dot gnu.org,

[Bug c++/70180] missing -Wpointer-arith on NULL arithmetic cast to a an object type

2017-08-28 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70180 Eric Gallager changed: What|Removed |Added Keywords||diagnostic, documentation