This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: g++ doesn't like "major" & "minor" as class variable names.
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: adunstan at optimetrics dot org
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 21 Feb 2002 23:55:03 +0100
- Subject: Re: g++ doesn't like "major" & "minor" as class variable names.
> As far as I can tell neither "major" nor "minor" are keywords.
They are not gcc reserved names, but *glibc* reserved names!
Indeed, try reducing your testcase to something not including <iostream> and the
problem will go away, since <iostreams> ends up including
/usr/include/sys/sysmacros.h which defines the macros "major" and "minor".
Ciao, Paolo.