From c6b8b5e4d32f1e151002fd52d18d21cf235ea791 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 17 Jan 2017 15:26:11 +0000 Subject: [PATCH] PR69699 document why __GLIBCXX__ macro is useless PR libstdc++/69699 * doc/xml/manual/abi.xml (abi.versioning.history): Explain why the _GLIBCXX__ macro is not useful. Remove redundant date information and link to the GCC release timeline. (abi.versioning.active): Move partial sentence into the previous paragraph. * doc/html/*: Regenerate. From-SVN: r244532 --- libstdc++-v3/ChangeLog | 8 +++ libstdc++-v3/doc/html/manual/abi.html | 32 +++++++++--- libstdc++-v3/doc/xml/manual/abi.xml | 72 ++++++++++++--------------- 3 files changed, 66 insertions(+), 46 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a3f9b43ccbe..b00f7d3ab78 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,13 @@ 2017-01-17 Jonathan Wakely + PR libstdc++/69699 + * doc/xml/manual/abi.xml (abi.versioning.history): Explain why the + _GLIBCXX__ macro is not useful. Remove redundant date information + and link to the GCC release timeline. + (abi.versioning.active): Move partial sentence into the previous + paragraph. + * doc/html/*: Regenerate. + PR libstdc++/79114 * libsupc++/nested_exception.h (throw_with_nested): Use decay instead of remove_reference. diff --git a/libstdc++-v3/doc/html/manual/abi.html b/libstdc++-v3/doc/html/manual/abi.html index 495d7395564..8988e4559a6 100644 --- a/libstdc++-v3/doc/html/manual/abi.html +++ b/libstdc++-v3/doc/html/manual/abi.html @@ -153,12 +153,33 @@ compatible. was released, in compressed ISO date format, as an unsigned long.

This macro is defined in the file "c++config" in the - "libstdc++-v3/include/bits" directory. (Up to GCC 4.1.0, it was - changed every night by an automated script. Since GCC 4.1.0, it is - the same value as gcc/DATESTAMP.) + "libstdc++-v3/include/bits" directory. Up to GCC 4.1.0, it was + changed every night by an automated script. Since GCC 4.1.0 it is set + during configuration to the same value as + gcc/DATESTAMP, so for an official release its value + is the same as the date of the release, which is given in the GCC Release + Timeline. +

+ This macro is not useful for determining whether a particular feature is + supported by the version of libstdc++ you are using. The date of a release + might be after a feature was added to the development trunk, but the + release could be from an older branch. For example, in the 5.4.0 release + the macro has the value 20160603 which is greater than the 20160427 value + of the macro in the 6.1.0 release, but there are features supported in the + 6.1.0 release that are not supported in 5.4.0 release. + You also can't test for the the exact values listed below to try and + identify a release, because a snapshot taken from the gcc-5-branch on + 2016-04-27 would have the same value for the macro as the 6.1.0 release + despite being a different version. + Many GNU/Linux distributions build their GCC packages from snapshots, so + the macro can have dates that doesn't correspond to official releases.

It is versioned as follows: -

  • GCC 3.0.0: 20010615

  • GCC 3.0.1: 20010819

  • GCC 3.0.2: 20011023

  • GCC 3.0.3: 20011220

  • GCC 3.0.4: 20020220

  • GCC 3.1.0: 20020514

  • GCC 3.1.1: 20020725

  • GCC 3.2.0: 20020814

  • GCC 3.2.1: 20021119

  • GCC 3.2.2: 20030205

  • GCC 3.2.3: 20030422

  • GCC 3.3.0: 20030513

  • GCC 3.3.1: 20030804

  • GCC 3.3.2: 20031016

  • GCC 3.3.3: 20040214

  • GCC 3.4.0: 20040419

  • GCC 3.4.1: 20040701

  • GCC 3.4.2: 20040906

  • GCC 3.4.3: 20041105

  • GCC 3.4.4: 20050519

  • GCC 3.4.5: 20051201

  • GCC 3.4.6: 20060306

  • GCC 4.0.0: 20050421

  • GCC 4.0.1: 20050707

  • GCC 4.0.2: 20050921

  • GCC 4.0.3: 20060309

  • GCC 4.1.0: 20060228

  • GCC 4.1.1: 20060524

  • GCC 4.1.2: 20070214

  • GCC 4.2.0: 20070514

  • GCC 4.2.1: 20070719

  • GCC 4.2.2: 20071007

  • GCC 4.2.3: 20080201

  • GCC 4.2.4: 20080519

  • GCC 4.3.0: 20080306

  • GCC 4.3.1: 20080606

  • GCC 4.3.2: 20080827

  • GCC 4.3.3: 20090124

  • GCC 4.3.4: 20090804

  • GCC 4.3.5: 20100522

  • GCC 4.3.6: 20110627

  • GCC 4.4.0: 20090421

  • GCC 4.4.1: 20090722

  • GCC 4.4.2: 20091015

  • GCC 4.4.3: 20100121

  • GCC 4.4.4: 20100429

  • GCC 4.4.5: 20101001

  • GCC 4.4.6: 20110416

  • GCC 4.4.7: 20120313

  • GCC 4.5.0: 20100414

  • GCC 4.5.1: 20100731

  • GCC 4.5.2: 20101216

  • GCC 4.5.3: 20110428

  • GCC 4.5.4: 20120702

  • GCC 4.6.0: 20110325

  • GCC 4.6.1: 20110627

  • GCC 4.6.2: 20111026

  • GCC 4.6.3: 20120301

  • GCC 4.7.0: 20120322

  • GCC 4.7.1: 20120614

  • GCC 4.7.2: 20120920

  • +

    • GCC 3.0.0: 20010615

    • GCC 3.0.1: 20010819

    • GCC 3.0.2: 20011023

    • GCC 3.0.3: 20011220

    • GCC 3.0.4: 20020220

    • GCC 3.1.0: 20020514

    • GCC 3.1.1: 20020725

    • GCC 3.2.0: 20020814

    • GCC 3.2.1: 20021119

    • GCC 3.2.2: 20030205

    • GCC 3.2.3: 20030422

    • GCC 3.3.0: 20030513

    • GCC 3.3.1: 20030804

    • GCC 3.3.2: 20031016

    • GCC 3.3.3: 20040214

    • GCC 3.4.0: 20040419

    • GCC 3.4.1: 20040701

    • GCC 3.4.2: 20040906

    • GCC 3.4.3: 20041105

    • GCC 3.4.4: 20050519

    • GCC 3.4.5: 20051201

    • GCC 3.4.6: 20060306

    • GCC 4.0.0: 20050421

    • GCC 4.0.1: 20050707

    • GCC 4.0.2: 20050921

    • GCC 4.0.3: 20060309

    • + GCC 4.1.0 and later: the GCC release date, as shown in the + GCC + Release Timeline +

  • Incremental bumping of a library pre-defined macro, _GLIBCPP_VERSION. This macro is defined as the released version of the library, as a string literal. This is only implemented in @@ -226,13 +247,12 @@ compatible.

    Checking Active

    When the GNU C++ library is being built with symbol versioning on, you should see the following at configure time for - libstdc++: + libstdc++ (showing either 'gnu' or another of the supported styles):

     
       checking versioning on shared library symbols... gnu
     
     

    - or another of the supported styles. If you don't see this line in the configure output, or if this line appears but the last word is 'no', then you are out of luck.

    diff --git a/libstdc++-v3/doc/xml/manual/abi.xml b/libstdc++-v3/doc/xml/manual/abi.xml index 8e4a3fa7273..c818bd86605 100644 --- a/libstdc++-v3/doc/xml/manual/abi.xml +++ b/libstdc++-v3/doc/xml/manual/abi.xml @@ -393,10 +393,32 @@ compatible. This macro is defined in the file "c++config" in the - "libstdc++-v3/include/bits" directory. (Up to GCC 4.1.0, it was - changed every night by an automated script. Since GCC 4.1.0, it is - the same value as gcc/DATESTAMP.) + "libstdc++-v3/include/bits" directory. Up to GCC 4.1.0, it was + changed every night by an automated script. Since GCC 4.1.0 it is set + during configuration to the same value as + gcc/DATESTAMP, so for an official release its value + is the same as the date of the release, which is given in the GCC Release + Timeline. + + + This macro is not useful for determining whether a particular feature is + supported by the version of libstdc++ you are using. The date of a release + might be after a feature was added to the development trunk, but the + release could be from an older branch. For example, in the 5.4.0 release + the macro has the value 20160603 which is greater than the 20160427 value + of the macro in the 6.1.0 release, but there are features supported in the + 6.1.0 release that are not supported in 5.4.0 release. + You also can't test for the the exact values listed below to try and + identify a release, because a snapshot taken from the gcc-5-branch on + 2016-04-27 would have the same value for the macro as the 6.1.0 release + despite being a different version. + Many GNU/Linux distributions build their GCC packages from snapshots, so + the macro can have dates that doesn't correspond to official releases. + + It is versioned as follows: @@ -427,41 +449,12 @@ compatible. GCC 4.0.1: 20050707 GCC 4.0.2: 20050921 GCC 4.0.3: 20060309 - GCC 4.1.0: 20060228 - GCC 4.1.1: 20060524 - GCC 4.1.2: 20070214 - GCC 4.2.0: 20070514 - GCC 4.2.1: 20070719 - GCC 4.2.2: 20071007 - GCC 4.2.3: 20080201 - GCC 4.2.4: 20080519 - GCC 4.3.0: 20080306 - GCC 4.3.1: 20080606 - GCC 4.3.2: 20080827 - GCC 4.3.3: 20090124 - GCC 4.3.4: 20090804 - GCC 4.3.5: 20100522 - GCC 4.3.6: 20110627 - GCC 4.4.0: 20090421 - GCC 4.4.1: 20090722 - GCC 4.4.2: 20091015 - GCC 4.4.3: 20100121 - GCC 4.4.4: 20100429 - GCC 4.4.5: 20101001 - GCC 4.4.6: 20110416 - GCC 4.4.7: 20120313 - GCC 4.5.0: 20100414 - GCC 4.5.1: 20100731 - GCC 4.5.2: 20101216 - GCC 4.5.3: 20110428 - GCC 4.5.4: 20120702 - GCC 4.6.0: 20110325 - GCC 4.6.1: 20110627 - GCC 4.6.2: 20111026 - GCC 4.6.3: 20120301 - GCC 4.7.0: 20120322 - GCC 4.7.1: 20120614 - GCC 4.7.2: 20120920 + + GCC 4.1.0 and later: the GCC release date, as shown in the + GCC + Release Timeline + @@ -619,7 +612,7 @@ compatible. When the GNU C++ library is being built with symbol versioning on, you should see the following at configure time for - libstdc++: + libstdc++ (showing either 'gnu' or another of the supported styles): @@ -629,7 +622,6 @@ compatible. - or another of the supported styles. If you don't see this line in the configure output, or if this line appears but the last word is 'no', then you are out of luck. -- 2.30.2