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++/71011] New: Wrong "may be uninitialized" warning


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71011

            Bug ID: 71011
           Summary: Wrong "may be uninitialized" warning
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bobby.prani at gmail dot com
  Target Milestone: ---

I am getting a warning that "data" may be uninitialized. But there is no such
variable being used anywhere.

src/allocate.cc: In member function âvoid allocate_c::run_a_cycle()â:
src/allocate.cc:136:19: error: âdataâ may be used uninitialized in this
function [-Werror=maybe-uninitialized]
     else if (uop->m_uop_type == UOP_IADD || // integer register
              ~~~~~^~~~~~~~~~
cc1plus: all warnings being treated as errors

Please find attached the source along with pre-processed file. Tested with g++
4.7 and up and it is the same in all versions.

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