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++/74765] New: missing uninitialized warning (parenthesis, TREE_NO_WARNING abuse)


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

            Bug ID: 74765
           Summary: missing uninitialized warning (parenthesis,
                    TREE_NO_WARNING abuse)
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: manu at gcc dot gnu.org
  Target Milestone: ---

int foo(int x, int y)
{
    int i;
    if ((i ==0)) return x;
    return y;
}

int foo2(int x, int y)
{
    int i;
    if (i ==0) return x;
    return y;
}

The extra parenthesis hide the -Wuninitialized warnings for foo(). Related to
PR25733. Different from PR74762.

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