[Bug c/71157] -Wnull-dereference false alarm in wrong function

eggert at gnu dot org gcc-bugzilla@gcc.gnu.org
Thu May 19 22:40:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71157

--- Comment #4 from Paul Eggert <eggert at gnu dot org> ---
I worked around the GCC bug by applying the attached file etags.c.patch to GNU
Emacs. etags.c.patch replaces some weird but valid C code (add a small constant
to a pointer and test whether the resulting pointer is non-null, a test that
always yields 1) with more-normal code (add a small constant to a pointer, then
yield 1). After preprocessing, this yields the attached file e-patched.i, and
the command 'gcc -O2 -S -Wnull-dereference e-patched.i' does not issue the
bogus warnings.


More information about the Gcc-bugs mailing list