[Bug preprocessor/19309] New: Wrong documentation of predefined __GNUC__ with cpp invocation
dannysmith at users dot sourceforge dot net
gcc-bugzilla@gcc.gnu.org
Fri Jan 7 10:45:00 GMT 2005
Hi,
According to documentation of preprocessor (cpp.texi:1934)
the predefined macros
__GNUC__
__GNUC_MINOR__
__GNUC_PATCHLEVEL__
"are defined only when the entire compiler is in use; if you invoke the
preprocessor directly, they are not defined."
But,
> touch foo.c
> cpp -dM -E foo.c | grep GNUC
produces
#define __GNUC_PATCHLEVEL__ 0
#define __GNUC__ 4
#define __GNUC_MINOR__ 0
Same behaviour is observed on 3.4.4.
Macros are also defined with cpp -traditional-cpp.
Should the documentation be modified?
Or is there any reason _not_ to define __GNUC__ when invoking cpp.
Danny
--
Summary: Wrong documentation of predefined __GNUC__ with cpp
invocation
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dannysmith at users dot sourceforge dot net
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-mingw32
GCC host triplet: i686-pc-mingw32
GCC target triplet: i686-pc-mingw32
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19309
More information about the Gcc-bugs
mailing list