This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC version bikeshedding
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Jonathan Wakely <jwakely dot gcc at gmail dot com>, Eric Botcazou <ebotcazou at libertysurf dot fr>, Ian Lance Taylor <iant at google dot com>, GCC Development <gcc at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>
- Date: Wed, 6 Aug 2014 12:36:41 +0200
- Subject: Re: GCC version bikeshedding
- Authentication-results: sourceware.org; auth=none
- References: <201408060925 dot 48414 dot ebotcazou at libertysurf dot fr> <20140806074223 dot GY7393 at tucnak dot redhat dot com> <CAFiYyc1+LTfbPF=nT3O4pA4ST6Z2X5FJ0ywMxL9bk3UsqwnV2w at mail dot gmail dot com> <20140806084803 dot GB7393 at tucnak dot redhat dot com> <CAFiYyc0+YgrRA-CheSFx5not6XadTWOa-mr_LWpX4sZ_gQMgdg at mail dot gmail dot com> <20140806090635 dot GD7393 at tucnak dot redhat dot com> <CAH6eHdSkX-kvXTN8ysKh38dWy1nUeQMnX6nGSm+sOdbSm7z1cw at mail dot gmail dot com> <CAFiYyc3fxDDX9TZeySaF8vMZqwb3ipwQs-vCmiOHK3Vdwe7uUg at mail dot gmail dot com> <CAH6eHdQtB4kNpvBWtFY0Eqyxi4JekEeLYw3Sc2RzO-qOcdeDkg at mail dot gmail dot com> <CAFiYyc0cxwM478wn54-V8Au4yX7MSmobsmk4Qc_Mjk3efogU+g at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Aug 06, 2014 at 12:31:57PM +0200, Richard Biener wrote:
> Ok, so the problematical case is
>
> struct X { std::string s; };
> void foo (X&);
Yeah.
> then. OTOH I remember that then mangling of X changes as well?
Only if you add abi_tag attribute to X.
I hope the libstdc++ folks will add some macro which will
include the right abi_tag attribute for the std::list/std::string
cases, so you'd in the end just add
#ifndef _GLIBCXX_ABI_TAG_SOMETHING
#define _GLIBCXX_ABI_TAG_SOMETHING
#endif
...
struct X _GLIBCXX_ABI_TAG_SOMETHING { std::string s; };
void foo (X&);
or similar.
Jakub