public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/53673] New: Add magic weak symbol to indicate C++ standard setting (C++03, C++11 etc) to help debug ABI problems
@ 2012-06-14 16:36 s_gccbugzilla at nedprod dot com
  2012-06-14 17:22 ` [Bug c++/53673] " redi at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: s_gccbugzilla at nedprod dot com @ 2012-06-14 16:36 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53673
           Summary: Add magic weak symbol to indicate C++ standard setting
                    (C++03, C++11 etc) to help debug ABI problems
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: s_gccbugzilla@nedprod.com


Can we have a magic weak symbol output by G++ into compilands saying what -std
setting was used? For example:

No -std outputs __gplusplus_std_cpluscplus98
-std=c++03 outputs __gplusplus_std_cplusplus03
-std=gnu++03 outputs __gplusplus_std_gnu03
-std=c++11 outputs __gplusplus_std_cplusplus11
-std=gnu++11 outputs __gplusplus_std_gnu11
... and so on ...

Why? Because right now it's too easy to accidentally link object files compiled
with 98 with those compiled with 11 and not then know why things spontaneously
fail:

http://gcc.gnu.org/ml/gcc/2012-06/msg00201.html
http://gcc.gnu.org/wiki/Cxx11AbiCompatibility

If __gplusplus_std_cpluscplus98 and __gplusplus_std_cplusplus11 both turn up in
a shared object or executable, then we know we have combined 98 and 11 built
code. Indeed, a future ld could warn if this happens.

Niall


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2012-06-18 14:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-14 16:36 [Bug c++/53673] New: Add magic weak symbol to indicate C++ standard setting (C++03, C++11 etc) to help debug ABI problems 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
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

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).