[Bug libstdc++/78905] Add a macro to determine that the library is implemented
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78905 Jonathan Wakely changed: What|Removed |Added CC||coypu at sdf dot org --- Comment #11 from Jonathan Wakely --- *** Bug 81353 has been marked as a duplicate of this bug. ***
[Bug libstdc++/78905] Add a macro to determine that the library is implemented
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78905 Eric Gallager changed: What|Removed |Added CC||egall at gwmail dot gwu.edu --- Comment #10 from Eric Gallager --- (In reply to Jonathan Wakely from comment #8) > (In reply to Matt Clarkson from comment #2) > > Because wehen I compile with clang against the libstdc++ the problem will > > still occur and __GNUC__ will not be defined. > > N.B. Clang does define __GNUC__ but it always defines it to 4 (and defines > __GNUC_MINOR__ to 1 and __GNUC_PATCHLEVEL__ to 2, because it identifies as > GCC 4.1.2, the last release Apple shipped for their OS). __GNUC_MINOR__ and __GNUC_PATCHLEVEL__ values are swapped with each other there; last release Apple shipped for their OS was 4.2.1, not 4.1.2
[Bug libstdc++/78905] Add a macro to determine that the library is implemented
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78905 --- Comment #9 from Matt Clarkson --- (In reply to Jonathan Wakely from comment #7) > GCC 7 now defines _GLIBCXX_RELEASE (with the same value as __GNUC__ has, > i.e. the GCC major version, as an integer constant, but defined by the > library headers not the compiler). > > If that macro is present you have a version of libstdc++ that provides a > working . To be really sure you could check it's defined to a value > >= 5, in order to handle (hypothetical) unofficial 4.7 or 4.8 builds that > have the patch backported. Sweet! Will update the snippet on Stack Overflow. Thank you for this, you the man ;)
[Bug libstdc++/78905] Add a macro to determine that the library is implemented
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78905 --- Comment #8 from Jonathan Wakely --- (In reply to Matt Clarkson from comment #2) > Because wehen I compile with clang against the libstdc++ the problem will > still occur and __GNUC__ will not be defined. N.B. Clang does define __GNUC__ but it always defines it to 4 (and defines __GNUC_MINOR__ to 1 and __GNUC_PATCHLEVEL__ to 2, because it identifies as GCC 4.1.2, the last release Apple shipped for their OS).
[Bug libstdc++/78905] Add a macro to determine that the library is implemented
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78905 Jonathan Wakely changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED Target Milestone|8.0 |7.0 --- Comment #7 from Jonathan Wakely --- GCC 7 now defines _GLIBCXX_RELEASE (with the same value as __GNUC__ has, i.e. the GCC major version, as an integer constant, but defined by the library headers not the compiler). If that macro is present you have a version of libstdc++ that provides a working . To be really sure you could check it's defined to a value >= 5, in order to handle (hypothetical) unofficial 4.7 or 4.8 builds that have the patch backported.
[Bug libstdc++/78905] Add a macro to determine that the library is implemented
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78905 --- Comment #6 from Jonathan Wakely --- Author: redi Date: Thu Jan 19 16:40:46 2017 New Revision: 244642 URL: https://gcc.gnu.org/viewcvs?rev=244642=gcc=rev Log: PR78905 define _GLIBCXX_RELEASE macro PR libstdc++/78905 * doc/xml/manual/abi.xml (abi.versioning.history): Add markup to macro names, filenames, and literal values. Document _GLIBCXX_RELEASE. Document that the deprecated _GLIBCXX_VERSION macro was removed for the 4.0.0 release. * doc/html/*: Regenerate. * include/Makefile.am (_GLIBCXX_RELEASE): Set value. * include/Makefile.in: Regenerate. * include/bits/c++config (_GLIBCXX_RELEASE): Add #define. * testsuite/ext/profile/mutex_extensions_neg.cc: Use lineno of 0 in dg-error. Modified: trunk/libstdc++-v3/ChangeLog trunk/libstdc++-v3/doc/html/manual/abi.html trunk/libstdc++-v3/doc/xml/manual/abi.xml trunk/libstdc++-v3/include/Makefile.am trunk/libstdc++-v3/include/Makefile.in trunk/libstdc++-v3/include/bits/c++config trunk/libstdc++-v3/testsuite/ext/profile/mutex_extensions_neg.cc
[Bug libstdc++/78905] Add a macro to determine that the library is implemented
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78905 Jonathan Wakely changed: What|Removed |Added Status|RESOLVED|NEW Last reconfirmed||2016-12-23 Resolution|INVALID |--- Target Milestone|--- |8.0 Ever confirmed|0 |1 Severity|normal |enhancement --- Comment #5 from Jonathan Wakely --- I asked for this to be created.
[Bug libstdc++/78905] Add a macro to determine that the library is implemented
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78905 --- Comment #4 from Matt Clarkson --- That's OK. I'm not particularly looking for the macro to be backported to 4.9. Just as we move forward the new macro is available. If not it's not the end of the world I can always maintain the snippet internally.
[Bug libstdc++/78905] Add a macro to determine that the library is implemented
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78905 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #3 from Andrew Pinski --- (In reply to Matt Clarkson from comment #2) > Because wehen I compile with clang against the libstdc++ the problem will > still occur and __GNUC__ will not be defined. This happens on any distro > where GCC is the default but ships clang as an alternative compiler. Not something which GCC supports directly. You need to ask clang folks about that :). Anyways 4.9.x is no longer maintained; there will be no new releases after the current release of 4.9.4 (which happened two years after the first release of 4.9.0).
[Bug libstdc++/78905] Add a macro to determine that the library is implemented
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78905 --- Comment #2 from Matt Clarkson --- Because wehen I compile with clang against the libstdc++ the problem will still occur and __GNUC__ will not be defined. This happens on any distro where GCC is the default but ships clang as an alternative compiler.
[Bug libstdc++/78905] Add a macro to determine that the library is implemented
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78905 --- Comment #1 from Andrew Pinski --- Why don't you use: __GNUC__ >=5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9) instead for checking GCC version?