Re: [Boost-bugs] [Boost C++ Libraries] #8438: vector & circular_buffer storage misbehave when using compiler optimizations

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #8438: vector & circular_buffer storage misbehave when using compiler optimizations
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-04-15 19:08:24


#8438: vector & circular_buffer storage misbehave when using compiler
optimizations
-------------------------------+--------------------------------------------
  Reporter: ofir | Owner: jano_gaspar
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: circular_buffer
   Version: Boost 1.52.0 | Severity: Problem
Resolution: | Keywords:
-------------------------------+--------------------------------------------

Comment (by marshall):

 I was able to replicate this with clang, but I got a warning which
 probably has some bearing here:
 {{{
 trunk/boost/numeric/ublas/vector.hpp:205:20: warning: returning reference
 to
       local temporary object [-Wreturn-stack-address]
             return data () [i];
                    ^~~~~~~~~~~
 trunk/boost/numeric/ublas/io.hpp:58:18: note: in instantiation of member
       function 'boost::numeric::ublas::vector<double,
       boost::circular_buffer<double, std::allocator<double> >
>::operator()'
       requested here
             s << v () (0);
                  ^
 junk.cpp:7:15: note: in instantiation of function template specialization
       'boost::numeric::ublas::operator<<<char, std::char_traits<char>,
       boost::numeric::ublas::vector<double, boost::circular_buffer<double,
       std::allocator<double> > > >' requested here
     std::cout << v << std::endl;
               ^
 1 warning generated.
 }}}

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/8438#comment:2>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:12 UTC