------- Additional Comments From andre dot maute at gmx dot de 2005-01-26 01:20 ------- (In reply to comment #11) > Anyways patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-01/msg01675.html>. the patch (used with gcc-4.0-20050123) doesn't fix the following code ---------- O3Wall-2.cc ------- #include <stack> int main() { int x = 3; int* ptr = &x; std::stack<int*> s; s.push(ptr); s.pop(); return 0; } ---------- O3Wall-2.cc ------- > g++-4.0-20050123-1 -O3 -Wall O3Wall-2.cc /opt/gcc-4.0-20050123-1/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/bits/stl_deque.h: In destructor 'std::_Deque_base<_Tp, _Alloc>::~_Deque_base() [with _Tp = int*, _Alloc = std::allocator<int*>]': /opt/gcc-4.0-20050123-1/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/bits/stl_deque.h:411: warning: control may reach end of non-void function 'typename _Alloc::rebind<_Tp*>::other std::_Deque_base<_Tp, _Alloc>::_M_get_map_allocator() const [with _Tp = int*, _Alloc = std::allocator<int*>]' being inlined /opt/gcc-4.0-20050123-1/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/bits/deque.tcc: In member function 'void std::deque<_Tp, _Alloc>::_M_reallocate_map(size_t, bool) [with _Tp = int*, _Alloc = std::allocator<int*>]': /opt/gcc-4.0-20050123-1/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/bits/deque.tcc:750: warning: control may reach end of non-void function '_Tp** std::_Deque_base<_Tp, _Alloc>::_M_allocate_map(size_t) [with _Tp = int*, _Alloc = std::allocator<int*>]' being inlined > g++-4.0-20050123-1 -v Using built-in specs. Configured with: ../gcc-4.0-20050123/configure --prefix=/opt/gcc-4.0-20050123-1 --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --disable-nls --program-suffix=-4.0-20050123-1 --disable-checking --with-arch=pentium3 Thread model: posix gcc version 4.0.0 20050123 (experimental)
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19583