This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/17130] New: identifier major macro expanded into gnu_dev_major
- From: "attardi at di dot unipi dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 21 Aug 2004 14:17:18 -0000
- Subject: [Bug preprocessor/17130] New: identifier major macro expanded into gnu_dev_major
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compiling this program
#include <fstream>
struct Header {
int major;
Header(int mj) :
major(mj) { }
};
you get:
gcc -v -save-temps -c foo.cc
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.3.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --
infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-
checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.3.2 20031022 (Red Hat Linux 3.3.2-1)
/usr/lib/gcc-lib/i386-redhat-linux/3.3.2/cc1plus -E -D__GNUG__=3 -quiet -v -
D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=2 -D_GNU_SOURCE foo.cc
foo.ii
ignoring nonexistent directory "/usr/i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/3.3.2
/usr/include/c++/3.3.2/i386-redhat-linux
/usr/include/c++/3.3.2/backward
/usr/local/include
/usr/lib/gcc-lib/i386-redhat-linux/3.3.2/include
/usr/include
End of search list.
/usr/lib/gcc-lib/i386-redhat-linux/3.3.2/cc1plus -fpreprocessed foo.ii -
quiet -dumpbase foo.cc -auxbase foo -version -o foo.s
GNU C++ version 3.3.2 20031022 (Red Hat Linux 3.3.2-1) (i386-redhat-linux)
compiled by GNU C version 3.3.2 20031022 (Red Hat Linux 3.3.2-1).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=129160
foo.cc: In constructor `Header::Header(int)':
foo.cc:7: error: class `Header' does not have any field named `gnu_dev_major'
If you rename major to anything else (except minor ;-), it works.
--
Summary: identifier major macro expanded into gnu_dev_major
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: attardi at di dot unipi dot it
CC: attardi at di dot unipi dot it,gcc-bugs at gcc dot gnu
dot org
GCC build triplet: gcc version 3.3.2 20031022 (Red Hat Linux 3.3.2-1)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17130