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

Reply via email to