[Gecode] gcc 3.4 build problems
Guido Tack
tack at ps.uni-sb.de
Tue Feb 22 18:27:54 CET 2005
Hi all!
I've just installed gcc 3.4 on my machine, because Didier reported some
problems he had using it to compile gecode. And indeed, it's just completely
screwed :-(
It seems that they made some fundamental changes in the way they treat name
lookup in inherited template classes. As a quick example, the following code
doesn't work any more:
template <class T>
class Foo {
protected:
int e;
};
template <class T>
class Bar : public Foo<T>
{
public:
void test() { e = e+1; }
};
>> error: `e' undeclared (first use this function)
You can fix it by prefixing every occurrence of e with Foo<T>. Now you can
imagine that this is simply not feasible for Gecode, we're using this pattern
in nearly every propagator that inherits from one of the generic templates.
I'm not sure if this is a bug or a feature, to me it definitely seems like a
bug. If anyone has any suggestions, please let me know; otherwise I would
suggest marking gcc 3.4 as not supported and hoping that this won't stay an
issue in 4.0.
Btw: 3.4 did find some weird bugs that 3.3 overlooked, however ;-)
Guido
--
http://www.ps.uni-sb.de/~tack
More information about the gecode-users
mailing list