This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Namespace bug?


Hi!

The following problem occured during use of EGCS (latest snapshot):

Using multiple nested namespaces, the compiler looses track of the
virtual method tables. Here are some code fragments

...

namespace PortableServer {
...

class ServantBase {
....
};

class DynamicImplementation : public virtual ServantBase {
....
};

}; // namespace PortableServer

namespace ODB {

....

namespace FS {
....

class FileServant : public PortableServer::DynamicImplementation {
....
}; 
....
}; // namespace FS
....
}; // namespace ODB

Now, when I link the stuff above, I get

In function `ODB::FS::FileServant::FileServant(int,
ODB::FileSystemDataSource_impl *)':
undefined reference to
`ODB::FS::FileServant::PortableServer::ServantBase virtual table'

Obviously, the compiler gets confused with the base class and assumes it
in the wrong namespace.

Any suggestions?

Thanks!

Joerg


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]