https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70180
Eric Gallager <egallager at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |diagnostic, documentation Status|UNCONFIRMED |NEW Last reconfirmed| |2017-08-28 CC| |egallager at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> --- I updated your example to include the additional cases you mentioned: $ cat 70180.cc #include <stddef.h> void *p = (int*)NULL + 1; void *q = (int*)NULL + 0; void *r = (void *)((int*)NULL - (int*)NULL); $ /usr/local/bin/gcc -c -S -Wall -Wextra -Wpedantic -Werror -xc 70180.cc $ /usr/local/bin/g++ -c -S -Wall -Wextra -Wpedantic -Werror -xc++ 70180.cc $ Confirmed.