[xml/sgml-pkgs] Bug#245368: I think this is a gcc bug

Jay Berkenbilt Jay Berkenbilt <ejb@ql.org>, 245368@bugs.debian.org
Tue, 18 May 2004 17:21:29 -0400

Based on your bug report, I decided to grab gcc-3.4 from experimental
and try compiling xerces23 with it.  I see this error and some others
that are the result of the same issue, but I believe they are actually
gcc errors, not problems in the xerces23 code.

Consider this code fragment:

template <class T>
class A
    int f;

template <class T>
class B: public A<T>
	f = 1;

gcc-3.3 thinks this is okay, but gcc-3.4 complains.  (This is
identical to the problem your patch fixes.)

However, changing "f = 1" above to "this->f = 1" removes the problem,
as does changing it to A<T>::f (similar to what your patch does) or
B<T>::f.  I'm pretty sure this is a gcc bug as I'm not aware of any
instance in the language where this->f should be different from f when
there is only one possible f in the current scope.

I'll post a bug report against gcc about this.  Maybe someone more
familiar with the spec can show a passage that indicates that I am
wrong about this.

Jay Berkenbilt <ejb@ql.org>