Bug 32233 - warning in stl_vector.h:832
Summary: warning in stl_vector.h:832
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libstdc++ (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Paolo Carlini
URL:
Keywords:
: 32208 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-06 13:28 UTC by Wouter Vermaelen
Modified: 2007-06-06 21:13 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2007-06-06 18:23:14


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wouter Vermaelen 2007-06-06 13:28:20 UTC
This program:

#include <vector>
int main() {
        std::vector<int> v(10);
}

Triggers the following warning in recent SVN versions:

/home/wouter/gcc/local/lib/gcc/x86_64-unknown-linux-gnu/4.3.0/../../../../include/c++/4.3.0/bits/stl_vector.h: In member function ‘int std::vector<_Tp, _Alloc>::_M_fill_initialize(size_t, const _Tp&) [with _Tp = int, _Alloc = std::allocator<int>]’:
/home/wouter/gcc/local/lib/gcc/x86_64-unknown-linux-gnu/4.3.0/../../../../include/c++/4.3.0/bits/stl_vector.h:832: warning: control reaches end of non-void function
Comment 1 Paolo Carlini 2007-06-06 18:23:14 UTC
Mine, fixed momentarily.
Comment 2 paolo@gcc.gnu.org 2007-06-06 18:44:15 UTC
Subject: Bug 32233

Author: paolo
Date: Wed Jun  6 18:44:02 2007
New Revision: 125499

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=125499
Log:
2007-06-06  Paolo Carlini  <pcarlini@suse.de>

	PR libstdc++/32233
	* include/bits/stl_vector.h (_M_fill_initialize): Fix return type.
	* testsuite/23_containers/vector/requirements/dr438/assign_neg.cc:
	Adjust dg-error line.
	* testsuite/23_containers/vector/requirements/dr438/insert_neg.cc:
	Likewise.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/stl_vector.h
    trunk/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/assign_neg.cc
    trunk/libstdc++-v3/testsuite/23_containers/vector/requirements/dr438/insert_neg.cc

Comment 3 Paolo Carlini 2007-06-06 18:45:14 UTC
Fixed.
Comment 4 Andrew Pinski 2007-06-06 21:13:26 UTC
*** Bug 32208 has been marked as a duplicate of this bug. ***