GCC 3.3 bug: 'friend class ::D<int>' does not parse unless the "::" is removed

Yuval Kfir yuvalk@mainsoft.com
Tue May 30 14:25:00 GMT 2006

I'm looking for a specific patch for a problem that was present in GCC
3.2 and 3.3, and is fixed in GCC 3.4, but I cannot find a matching fix
report in the bugzilla database.

My sample is:
template <class T> class D {};
class E : public D<int> { friend class ::D<int>; };

This reports "parse error before `;' token", unless the :: qualifier is

This is almost identical to bug #8932 in the Bugzilla database. That bug
was rejected, but the code _does_ parse correctly with GCC 3.4, so
obviously something _was_ fixed.  My question is, how can I find what
the fix was?

Much obliged,
- Yuval 

More information about the Gcc-help mailing list