Bug 21183 - -Wall control may end non-void fn warning in libc++ routine
Summary: -Wall control may end non-void fn warning in libc++ routine
Status: RESOLVED DUPLICATE of bug 19699
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.0.0
: P2 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-23 23:11 UTC by Mark Johnson
Modified: 2005-07-23 22:49 UTC (History)
1 user (show)

See Also:
Host: i686-pc-linux-gnu
Target: i686-pc-linux-gnu
Build: i686-pc-linux-gnu
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Johnson 2005-04-23 23:11:38 UTC
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).
Comment 1 Andrew Pinski 2005-04-23 23:14:11 UTC
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 ***
Comment 2 Mark Johnson 2005-04-24 00:49:47 UTC
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 ***
>
>  
>