[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gcc
Subject:    major & minor macros?!?!?
From:       Benjamin Scherrey <scherrey () switchco ! com>
Date:       2000-01-25 6:17:53
[Download RAW message or body]

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.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic