]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR preprocessor/19309 (Wrong documentation of predefined __GNUC__ with cpp invoca...
authorSteven Bosscher <stevenb@suse.de>
Thu, 10 Feb 2005 13:14:02 +0000 (13:14 +0000)
committerSteven Bosscher <steven@gcc.gnu.org>
Thu, 10 Feb 2005 13:14:02 +0000 (13:14 +0000)
PR documentation/19309
* doc/cpp.texi: The __GNUC__ and related predefined macros
are also defined for the "standalone" cpp.
Some non-GCC compilers may also define __GNUC__.

From-SVN: r94805

gcc/ChangeLog
gcc/doc/cpp.texi

index dfef24b7a887beb6173f4bd1ecd2d8fc7290d625..e2c251a5a5d9e3cf18217f69c6e4a70a799aef53 100644 (file)
@@ -1,3 +1,10 @@
+2005-02-10  Steven Bosscher  <stevenb@suse.de>
+
+       PR documentation/19309
+       * doc/cpp.texi: The __GNUC__ and related predefined macros
+       are also defined for the "standalone" cpp.
+       Some non-GCC compilers may also define __GNUC__.
+
 2005-02-10  Jakub Jelinek  <jakub@redhat.com>
 
        PR c/19342
index 40b310bec83d197f143d34b5505175d2e88d414e..ea38218b8c14a25d01cda861c318ed3d7a0e694c 100644 (file)
@@ -1927,16 +1927,16 @@ These macros are defined by all GNU compilers that use the C
 preprocessor: C, C++, and Objective-C@.  Their values are the major
 version, minor version, and patch level of the compiler, as integer
 constants.  For example, GCC 3.2.1 will define @code{__GNUC__} to 3,
-@code{__GNUC_MINOR__} to 2, and @code{__GNUC_PATCHLEVEL__} to 1.  They
-are defined only when the entire compiler is in use; if you invoke the
-preprocessor directly, they are not defined.
+@code{__GNUC_MINOR__} to 2, and @code{__GNUC_PATCHLEVEL__} to 1.  These
+macros are also defined if you invoke the preprocessor directly.
 
 @code{__GNUC_PATCHLEVEL__} is new to GCC 3.0; it is also present in the
 widely-used development snapshots leading up to 3.0 (which identify
 themselves as GCC 2.96 or 2.97, depending on which snapshot you have).
 
 If all you need to know is whether or not your program is being compiled
-by GCC, you can simply test @code{__GNUC__}.  If you need to write code
+by GCC, or a non-GCC compiler that claims to accept the GNU C dialects,
+you can simply test @code{__GNUC__}.  If you need to write code
 which depends on a specific version, you must be more careful.  Each
 time the minor version is increased, the patch level is reset to zero;
 each time the major version is increased (which happens rarely), the