posible bug with access to derived class data

Peter J Abeles pja@andrew.cmu.edu
Sun Aug 9 20:00:00 GMT 1998


I am trying to access a public data member class map in the class
UniverseHandler which is a derived class.  another derived
class has a public data member also called map.  So I need to specify I
want the map from UniverseHandler.  In gcc and metrowerks this code works
just fine and I checked with some books and with several other people and
they agree with me that this should work

MapClass *foo = &(UniverseHandler::map);

./src/Game.cpp:102: initialization to `MapClass *' from `MapClass
UniverseHandler::*'

I know egcs is very strict so is this some obscure thing in C++?  Or is
there an actual bug? Or ...?

Peter Abeles





More information about the Gcc-bugs mailing list