This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]