]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libcpu: Remove false positive null ptr deref warning for GCC -O3
authorPhilippe Benard <phi.debian@gmail.com>
Thu, 9 Jan 2025 13:59:00 +0000 (14:59 +0100)
committerAaron Merey <amerey@redhat.com>
Fri, 10 Jan 2025 23:13:47 +0000 (18:13 -0500)
commit977c4dba220db572fe5ff43b6eb8b81673be0ef7
tree2a85edc2a76a880c684b4bd68e84618b0511cab8
parent9c13147a3a7479414addfe58132a78f4311b74ad
libcpu: Remove false positive null ptr deref warning for GCC -O3

i386_lex_CFLAGS is a make variable to tweak the i386_lex.c.o
specific compile flags. The are already some -W defined there, I'd
like to add one to avoid seeing false warning during build with -O3
compile flag.

GCC 14.2 (as well as 13.x) produce a false positive warning for the
i386 lexer, a bug is filled already against GCC for that, CLANG is
immune.

* libcpu/Makefile.am
i386_lex_CFLAGS += $(subst -O3,-Wno-null-dereference,$(findstring -O3,$(CFLAGS)))

https://sourceware.org/bugzilla/show_bug.cgi?id=32527

Signed-off-by: Philippe Benard <phi.debian@gmail.com>
libcpu/Makefile.am