http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53646

--- Comment #5 from Michael Matz <matz at gcc dot gnu.org> 2012-06-12 15:36:01 
UTC ---
(In reply to comment #2)
> N.B. std::pair is not a POD in c++98 or c++11, so I don't know what libstdc++
> could have done to cause the FE to change how it returns a std::pair.

I don't know if it's PODness (but I believe that it is), but the calling
convention is changed by the existence of this c++11 construct in std::pair:

      pair(pair&& __p)
      noexcept(__and_<is_nothrow_move_constructible<_T1>,
               is_nothrow_move_constructible<_T2>>::value)
      : first(std::forward<first_type>(__p.first)),
        second(std::forward<second_type>(__p.second)) { }

It's some sort of copy-ctor, right?  In any case when it's there (and it's
only there when compiling/preprocessing in c++11 mode), then the frontend
makes this type be TREE_ADDRESSABLE, aggregate_value_p will return true,
and that makes the ABI use an invisible reference.

Reply via email to