This documents the new _GLIBCXX_RELEASE macro in the main manual, not just the appendix on ABI version history.
* 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. Committing to trunk shortly.
commit 4bf47e5a673d2d2be63b5bad6088c4d1ab29419e Author: Jonathan Wakely <jwak...@redhat.com> Date: Tue Mar 28 13:37:36 2017 +0100 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. diff --git a/libstdc++-v3/doc/xml/manual/abi.xml b/libstdc++-v3/doc/xml/manual/abi.xml index 3ef57d5..e79bf8c 100644 --- a/libstdc++-v3/doc/xml/manual/abi.xml +++ b/libstdc++-v3/doc/xml/manual/abi.xml @@ -383,7 +383,7 @@ compatible. <para/> </listitem> - <listitem> + <listitem xml:id="abi.versioning.__GLIBCXX__"> <para>Incremental bumping of a library pre-defined macro. For releases before 3.4.0, the macro is <symbol>__GLIBCPP__</symbol>. For later releases, it's <symbol>__GLIBCXX__</symbol>. (The libstdc++ project diff --git a/libstdc++-v3/doc/xml/manual/using.xml b/libstdc++-v3/doc/xml/manual/using.xml index 3057a93..5c0e1b9 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. </para> - <para>Below is the macro which users may check for library version + <para>Below are the macros which users may check for library version information. </para> <variablelist> <varlistentry> + <term><code>_GLIBCXX_RELEASE</code></term> + <listitem> + <para>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 <symbol>__GNUC__</symbol>. + This macro can be used when libstdc++ is used with a non-GNU + compiler where <symbol>__GNUC__</symbol> 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. + </para> + </listitem> + </varlistentry> + <varlistentry> <term><code>__GLIBCXX__</code></term> <listitem> - <para>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 <link linkend="appendix.porting.abi"> - ABI Policy and Guidelines</link> appendix. - </para> - </listitem> + <para>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 + <link linkend="abi.versioning.__GLIBCXX__">ABI History</link> + appendix. + </para> + </listitem> </varlistentry> </variablelist> @@ -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. </para> - <para>(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 + <para>(As an example, the POSIX standard requires that C stdio + <code>FILE*</code> operations are atomic. POSIX-conforming C libraries + (e.g, on Solaris and GNU/Linux) have an internal mutex to serialize + operations on <code>FILE*</code>s. + However, you still need to not do stupid things like calling <code>fclose(fs)</code> in one thread followed by an access of <code>fs</code> in another.) </para>