This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/81329] New: Missing -Wmaybe-uninitialized warning
- From: "tudorb at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 05 Jul 2017 21:06:43 +0000
- Subject: [Bug c/81329] New: Missing -Wmaybe-uninitialized warning
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81329
Bug ID: 81329
Summary: Missing -Wmaybe-uninitialized warning
Product: gcc
Version: 7.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: tudorb at gmail dot com
Target Milestone: ---
Created attachment 41689
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41689&action=edit
Missed maybe-uninitialized warning: test case
The attached test case should warn, as foo is used uninitialized if the
"atoi(argv[1]) != 0" branch isn't taken. There are no warnings, even with
"-Wall -Wextra".
Tested with gcc 7.1, both with -O0 and with -O3, see
https://godbolt.org/g/J5wRSM