This is GCC Bugzilla
This is GCC Bugzilla Version 2.20+
View Bug Activity | Format For Printing | Clone This Bug
I do not know whether this is a bug in the compiler or illegal code. The following program does not compile: template <typename c> struct a { typedef int b; operator b(); }; template <typename c> a<c>::operator typename a<c>::b() // omitting `typename' // makes no difference { return 0; } Workaround: template <typename c> struct a { typedef int b; operator b() {return 0;} }; Without templates there is no problem: struct a { typedef int b; operator b(); }; a::operator a::b() { return 0; } Release: 3.0.1 Environment: SuSE 7.1
State-Changed-From-To: open->analyzed State-Changed-Why: confirmed
State-Changed-From-To: analyzed->closed State-Changed-Why: Already fixed for 3.3 and 3.4.