[Bug c/61677] New: False positive with -Wmaybe-uninitialized (test case included)
josh at joshtriplett dot org
gcc-bugzilla@gcc.gnu.org
Wed Jul 2 22:24:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61677
Bug ID: 61677
Summary: False positive with -Wmaybe-uninitialized (test case
included)
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: josh at joshtriplett dot org
Created attachment 33055
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33055&action=edit
Test case for false positive in -Wmaybe-uninitialized
With the attached file bug.i:
$ gcc -Wall -O2 -c bug.i -o /dev/null
In file included from scripts/kconfig/zconf.tab.c:2537:0:
scripts/kconfig/menu.c: In function ‘get_symbol_str’:
scripts/kconfig/menu.c:590:18: warning: ‘jump’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
In file included from scripts/kconfig/zconf.tab.c:2537:0:
scripts/kconfig/menu.c:551:19: note: ‘jump’ was declared here
The warning occurs in get_prompt_str, which initializes jump if (head &&
location), and subsequently uses jump if (head && location && ...).
gcc --version says "gcc (Debian 4.9.0-9) 4.9.0"
More information about the Gcc-bugs
mailing list