public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jason Merrill <jason@redhat.com>
To: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: C++ PATCH for c++/65046 (ABI tags and functions/variables)
Date: Mon, 06 Apr 2015 12:59:00 -0000	[thread overview]
Message-ID: <55227F17.6080106@redhat.com> (raw)
In-Reply-To: <20150404113848.GA392@x4>

On 04/04/2015 07:38 AM, Markus Trippelsdorf wrote:
> This breaks compatibility with other compilers. Consider the case when
> a user compiles a library, that contains e.g. some member function with
> a std::string return type, with clang using gcc-5's libstdc++. It will
> be mangled without abi-tags, because clang doesn't support them.
> Now when the user switches back to gcc-5 and uses the libraries headers
> in a new project he will get undefined symbol errors when linking with
> the library, because gcc-5 adds an abi-tag to the member function
> declaration.

I don't know what clang will do with GCC 5's libstdc++, but if it 
doesn't support ABI tags then in the best case it will use the old ABI, 
and so undefined symbol errors are exactly what we want, rather than 
runtime corruption.

> Another issue is that the -Wabi-tag warning isn't enabled by -Wall or
> even by -Wextra.

That's because I think the warning is mostly interesting for library 
vendors; most users shouldn't need to worry about it.

Jason

  reply	other threads:[~2015-04-06 12:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-19 19:17 Jason Merrill
2015-04-04 11:38 ` Markus Trippelsdorf
2015-04-06 12:59   ` Jason Merrill [this message]
2015-04-06 13:23     ` Markus Trippelsdorf
2015-04-06 20:45       ` Jason Merrill
2015-04-06 21:31         ` Markus Trippelsdorf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55227F17.6080106@redhat.com \
    --to=jason@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=markus@trippelsdorf.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).