public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/53673] Add magic weak symbol to indicate C++ standard setting (C++03, C++11 etc) to help debug ABI problems Date: Fri, 15 Jun 2012 15:38:00 -0000 [thread overview] Message-ID: <bug-53673-4-fUa8py5pG0@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-53673-4@http.gcc.gnu.org/bugzilla/> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53673 --- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-06-15 15:37:34 UTC --- (In reply to comment #3) > (In reply to comment #1) > > There's no point differentiating the gnu variants, they don't have any ABI > > impact. > > They don't have any ABI impact that we know of at the present time in this > present generation of GCCs. As a debug aid that's likely to be there from now > on and forever, who's to say about the future. The GCC maintainers are to say. > Better to cover all bases now > I'd say, just in case. There's no point adding (and maintaining) yet another feature to handle hypothetical differences which *by*design* should not happen. Far more relevant than c++11 vs gnu++11 is -fabi-version=n, which your scheme doesn't cover. > > This could (and probably should) be done in the library because the output of > > G++ is ABI compatible, it's only standard library components that are not. > > There are no shortage of third party libraries which enable special new stuff > when compiled with GNU additions turned on. Not GCC's problem, and no different to libraries which enable new things when -fno-rtti or -fno-exceptions is used > Also, the ISO C++ standard is quite clear that ABI between C++03 and C++11 > compiled code is not guaranteed in the case where C++11 libraries/shared > objects are linked into a C++03 compiled program. Indeed, really an error ought > to be thrown if this happens for safety's sake, a warning as a minimum. [citation needed] ;) The standard says nothing about "libraries/shared objects" It's entirely possible to use G++ to build 100% ABI compatible applications using a mixture of -std=c++98 and -std=c++11 objects, if you don't use the parts of the standard library that are incompatible. A mandatory or warning would cause problems for anyone doing that.
next prev parent reply other threads:[~2012-06-15 15:38 UTC|newest] Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-06-14 16:36 [Bug c++/53673] New: " s_gccbugzilla at nedprod dot com 2012-06-14 17:22 ` [Bug c++/53673] " redi at gcc dot gnu.org 2012-06-14 20:06 ` pluto at agmk dot net 2012-06-15 15:14 ` s_gccbugzilla at nedprod dot com 2012-06-15 15:23 ` s_gccbugzilla at nedprod dot com 2012-06-15 15:38 ` redi at gcc dot gnu.org [this message] 2012-06-15 16:53 ` s_gccbugzilla at nedprod dot com 2012-06-15 17:47 ` redi at gcc dot gnu.org 2012-06-16 14:19 ` [Bug libstdc++/53673] " s_gccbugzilla at nedprod dot com 2012-06-18 0:07 ` redi at gcc dot gnu.org 2012-06-18 10:01 ` s_gccbugzilla at nedprod dot com 2012-06-18 14:22 ` redi at gcc dot gnu.org
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=bug-53673-4-fUa8py5pG0@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /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: linkBe 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).