This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
major & minor macros?!?!?
- To: gcc <gcc at gcc dot gnu dot org>
- Subject: major & minor macros?!?!?
- From: Benjamin Scherrey <scherrey at switchco dot com>
- Date: Tue, 25 Jan 2000 01:13:35 -0600
- Organization: Proteus Technologies, Inc.
- Reply-To: scherrey at proteus-tech dot com
I'm writing a C++ Version class that defines methods named major() and
minor() which return integer values of this Version's data. I'm not
quite sure but sometimes it works and sometimes it doesn't (especially
when I'm under a namespace) and complains that I'm using the macros
major and minor without any arguments. I can get rid of these errors
by using the following:
#ifdef major
#undef major
#endif
#ifdef minor
#undef minor
#endif
before the method declarations. First off, what are these macros for
(and where are they defined) and why do method calls resolve to these
macros instead of their proper C++ class methods? If this turns out to
be a bug (and not just my stupidity), is using the above #undef's a
safe workaround for this issue?
thanx & later,
Ben Scherrey
PS: I'm using gcc-2.95.2 on a linux/Intel box running RedHat 6.x.