From a138d52a9b33aa09ed0a535c38f54e56dfb37bd1 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Tue, 28 Mar 2017 13:43:06 +0100 Subject: [PATCH] Add _GLIBCXX_RELEASE macro to "Using" section of manual * doc/xml/manual/abi.xml: Add xml:id anchor. * doc/xml/manual/using.xml (manual.intro.using.macros): Document _GLIBCXX_RELEASE. Link to new anchor for __GLIBCXX__ notes. (concurrency.io.structure): Add markup. * doc/html/*: Regenerate. From-SVN: r246532 --- libstdc++-v3/ChangeLog | 6 +++ libstdc++-v3/doc/html/manual/abi.html | 2 +- .../doc/html/manual/using_concurrency.html | 9 ++-- .../doc/html/manual/using_macros.html | 25 +++++++---- libstdc++-v3/doc/xml/manual/abi.xml | 2 +- libstdc++-v3/doc/xml/manual/using.xml | 42 +++++++++++++------ 6 files changed, 61 insertions(+), 25 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 4a7869a1f6f..cc7c3fb93de 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,11 @@ 2017-03-28 Jonathan Wakely + * doc/xml/manual/abi.xml: Add xml:id anchor. + * doc/xml/manual/using.xml (manual.intro.using.macros): Document + _GLIBCXX_RELEASE. Link to new anchor for __GLIBCXX__ notes. + (concurrency.io.structure): Add markup. + * doc/html/*: Regenerate. + PR libstdc++/80229 * include/bits/shared_ptr_base.h (__shared_ptr::_M_enable_shared_from_this_with): Change parameters to diff --git a/libstdc++-v3/doc/html/manual/abi.html b/libstdc++-v3/doc/html/manual/abi.html index 3e619e8ec79..47425aabc22 100644 --- a/libstdc++-v3/doc/html/manual/abi.html +++ b/libstdc++-v3/doc/html/manual/abi.html @@ -145,7 +145,7 @@ compatible. -fabi-version.

It is versioned as follows: -

  • GCC 3.0: (Error, not versioned)

  • GCC 3.1: (Error, not versioned)

  • GCC 3.2: -fabi-version=1

  • GCC 3.3: -fabi-version=1

  • GCC 3.4, GCC 4.x: -fabi-version=2 (Incompatible with previous)

  • GCC 5 and higher: -fabi-version=0 (See GCC manual for meaning)

  • Incremental bumping of a library pre-defined macro. For releases +

    • GCC 3.0: (Error, not versioned)

    • GCC 3.1: (Error, not versioned)

    • GCC 3.2: -fabi-version=1

    • GCC 3.3: -fabi-version=1

    • GCC 3.4, GCC 4.x: -fabi-version=2 (Incompatible with previous)

    • GCC 5 and higher: -fabi-version=0 (See GCC manual for meaning)

  • Incremental bumping of a library pre-defined macro. For releases before 3.4.0, the macro is __GLIBCPP__. For later releases, it's __GLIBCXX__. (The libstdc++ project generously changed from CPP to CXX throughout its source to allow the diff --git a/libstdc++-v3/doc/html/manual/using_concurrency.html b/libstdc++-v3/doc/html/manual/using_concurrency.html index b404027e7e2..2b8d951ce4d 100644 --- a/libstdc++-v3/doc/html/manual/using_concurrency.html +++ b/libstdc++-v3/doc/html/manual/using_concurrency.html @@ -180,10 +180,11 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33) implementations of the C library with varying tradeoffs of threadsafety and efficiency. You, the programmer, are always required to take care with multiple threads. -

    (As an example, the POSIX standard requires that C stdio FILE* - operations are atomic. POSIX-conforming C libraries (e.g, on Solaris - and GNU/Linux) have an internal mutex to serialize operations on - FILE*s. However, you still need to not do stupid things like calling +

    (As an example, the POSIX standard requires that C stdio + FILE* operations are atomic. POSIX-conforming C libraries + (e.g, on Solaris and GNU/Linux) have an internal mutex to serialize + operations on FILE*s. + However, you still need to not do stupid things like calling fclose(fs) in one thread followed by an access of fs in another.)

    So, if your platform's C library is threadsafe, then your diff --git a/libstdc++-v3/doc/html/manual/using_macros.html b/libstdc++-v3/doc/html/manual/using_macros.html index ea146f1d582..f5a8a223a8b 100644 --- a/libstdc++-v3/doc/html/manual/using_macros.html +++ b/libstdc++-v3/doc/html/manual/using_macros.html @@ -17,13 +17,24 @@ features, or provide versioning information for the API. Only those macros listed below are offered for consideration by the general public. -

    Below is the macro which users may check for library version - information.

    __GLIBCXX__

    The current version of - libstdc++ in compressed ISO date format, as an unsigned - long. For details on the value of this particular macro for a - particular release, please consult the - ABI Policy and Guidelines appendix. -

    Below are the macros which users may change with #define/#undef or +

    Below are the macros which users may check for library version + information.

    _GLIBCXX_RELEASE

    The major release number for libstdc++. This macro is defined + to the GCC major version that the libstdc++ headers belong to, + as an integer constant. + When compiling with GCC it has the same value as GCC's pre-defined + macro __GNUC__. + This macro can be used when libstdc++ is used with a non-GNU + compiler where __GNUC__ is not defined, or has a + different value that doesn't correspond to the libstdc++ version. + This macro first appeared in the GCC 7.1 release and is not defined + for GCC 6.x or older releases. +

    __GLIBCXX__

    The revision date of the libstdc++ source code, + in compressed ISO date format, as an unsigned + long. For notes about using this macro and details on the value of + this macro for a particular release, please consult the + ABI History + appendix. +

    Below are the macros which users may change with #define/#undef or with -D/-U compiler flags. The default state of the symbol is listed.

    “Configurable” (or “Not configurable”) means that the symbol is initially chosen (or not) based on diff --git a/libstdc++-v3/doc/xml/manual/abi.xml b/libstdc++-v3/doc/xml/manual/abi.xml index 3ef57d57288..e79bf8cf8b1 100644 --- a/libstdc++-v3/doc/xml/manual/abi.xml +++ b/libstdc++-v3/doc/xml/manual/abi.xml @@ -383,7 +383,7 @@ compatible. - + Incremental bumping of a library pre-defined macro. For releases before 3.4.0, the macro is __GLIBCPP__. For later releases, it's __GLIBCXX__. (The libstdc++ project diff --git a/libstdc++-v3/doc/xml/manual/using.xml b/libstdc++-v3/doc/xml/manual/using.xml index 3057a937a34..5c0e1b9f8c1 100644 --- a/libstdc++-v3/doc/xml/manual/using.xml +++ b/libstdc++-v3/doc/xml/manual/using.xml @@ -829,20 +829,37 @@ g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe general public. - Below is the macro which users may check for library version + Below are the macros which users may check for library version information. + + _GLIBCXX_RELEASE + + The major release number for libstdc++. This macro is defined + to the GCC major version that the libstdc++ headers belong to, + as an integer constant. + When compiling with GCC it has the same value as GCC's pre-defined + macro __GNUC__. + This macro can be used when libstdc++ is used with a non-GNU + compiler where __GNUC__ is not defined, or has a + different value that doesn't correspond to the libstdc++ version. + This macro first appeared in the GCC 7.1 release and is not defined + for GCC 6.x or older releases. + + + __GLIBCXX__ - The current version of - libstdc++ in compressed ISO date format, as an unsigned - long. For details on the value of this particular macro for a - particular release, please consult the - ABI Policy and Guidelines appendix. - - + The revision date of the libstdc++ source code, + in compressed ISO date format, as an unsigned + long. For notes about using this macro and details on the value of + this macro for a particular release, please consult the + ABI History + appendix. + + @@ -1669,10 +1686,11 @@ gcc version 4.1.2 20070925 (Red Hat 4.1.2-33) and efficiency. You, the programmer, are always required to take care with multiple threads. - (As an example, the POSIX standard requires that C stdio FILE* - operations are atomic. POSIX-conforming C libraries (e.g, on Solaris - and GNU/Linux) have an internal mutex to serialize operations on - FILE*s. However, you still need to not do stupid things like calling + (As an example, the POSIX standard requires that C stdio + FILE* operations are atomic. POSIX-conforming C libraries + (e.g, on Solaris and GNU/Linux) have an internal mutex to serialize + operations on FILE*s. + However, you still need to not do stupid things like calling fclose(fs) in one thread followed by an access of fs in another.) -- 2.30.2