This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Use abi_tag attribute on std::list
- From: Marc Glisse <marc dot glisse at inria dot fr>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Fri, 3 Oct 2014 16:25:37 +0200 (CEST)
- Subject: Re: [patch] Use abi_tag attribute on std::list
- Authentication-results: sourceware.org; auth=none
- References: <20141003130447 dot GD4197 at redhat dot com>
- Reply-to: libstdc++ at gcc dot gnu dot org
On Fri, 3 Oct 2014, Jonathan Wakely wrote:
This is the patch I intend to commit to make std::list::size() O(1) as
required by C++11.
This is an ABI change, so std::list will get tagged with
abi_tag("cxx11") so that it mangles differently.
Assuming a future where we have both _GLIBCXX_ABI_TAG_CXX11 and
_GLIBCXX_ABI_TAG_CXX17, I don't really see how _GLIBCXX_DEFAULT_ABI_TAG
is supposed to work. We don't want to define _GLIBCXX_DEFAULT_ABI_TAG to
_GLIBCXX_ABI_TAG_CXX17 and suddenly have std::list change mangling. Should
it be called _GLIBCXX_DEFAULT_ABI_TAG_CXX11, meaning
Defining a dummy _M_distance in the old abi case is a bit strange (we
could protect the single use with #if _GLIBCXX_USE_CXX11_ABI), but why
Do you mind if I move (in a future patch once yours is committed) _M_size
into _M_impl::_M_node as suggested in PR 61347?