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++/12770] New: [3.4 regression] [tree-ssa] False warning about no return statement in function


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12770

           Summary: [3.4 regression] [tree-ssa] False warning about no
                    return statement in function
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at dealii dot org
                CC: gcc-bugs at gcc dot gnu dot org

I don't have time to fully reduce this testcase, but this
---------------------
#include <set>

int foo () {
  std::set<char> x;
  while (true)
    return x.size();
}
---------------------
shouldn't yield

common/scripts> ../../../../gcc-install/bin/c++ -W -Wall -c x.cc
x.cc: In function `int foo()':
x.cc:7: warning: control reaches end of non-void function

as it does with today's tree-ssa CVS. It certainly doesn't with
present mainline, so this is a regression.

W.


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