This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/21183] New: -Wall control may end non-void fn warning in libc++ routine
- From: "mj1 at cog dot brown dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Apr 2005 23:11:39 -0000
- Subject: [Bug libstdc++/21183] New: -Wall control may end non-void fn warning in libc++ routine
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
When compiling a C++ program with -Wall, I get the following compiler warning
/usr/local/bin/../lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/bits/stl_uninitialized.h:113:
warning: control may reach end of non-void function '_ForwardIterator
std::__uninitialized_copy_aux(_InputIterator, _InputIterator, _ForwardIterator,
__false_type) [with _InputIterator = pr_type*, _ForwardIterator = pr_type*]'
being inlined
The problem seems to be in __uninitialized_copy_aux() in stl_uninitialized.h
The catch statement block beginning on line 89 merely exits the routine without
actually returning a value.
The warning would not be given if a dummy return statement were added after
line 92 (even though the return statement could never be executed).
--
Summary: -Wall control may end non-void fn warning in libc++
routine
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mj1 at cog dot brown dot edu
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21183