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).
I am assuming you used -fno-exceptions, then this is a dup of bug 19699. *** This bug has been marked as a duplicate of 19699 ***
Subject: Re: -Wall control may end non-void fn warning in libc++ routine Thanks for the quick reply! Yes, I did use -fno-exceptions If I remove that, the warning goes away. Thanks very much for your help, Mark pinskia at gcc dot gnu dot org wrote: >------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-23 23:14 ------- >I am assuming you used -fno-exceptions, then this is a dup of bug 19699. > >*** This bug has been marked as a duplicate of 19699 *** > > >