[Bug c++/19007] New: parser fails at the position calling an inherited template function in a template base class.

iguchi at coral dot t dot u-tokyo dot ac dot jp gcc-bugzilla@gcc.gnu.org
Wed Dec 15 11:15:00 GMT 2004


G++ Compiler tells a error message as follows when the attached
program is compiled :

test.cpp: In member function `void CDerived<T>::g()':
test.cpp:14: parse error before `;' token

I think the correct behavior of the compiler is 
to issue no error message.

My environment is as follows:
OS: Red Hat Linux 3.2.2-5
CPU: Pentium 2GHz
Memory: 2GB

---- test.cpp ---
template <class T>
class CBase{
public: 
  template <class TR>
  void f(void){}
};

template <class T>
class CDerived : public CBase<T>
{
public:
  void g(void){
	f<T>();
  }
};

int main(void)
{
  return 0;
};

-- 
           Summary: parser fails at the position calling an inherited
                    template function in a template base class.
           Product: gcc
           Version: 3.2.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: iguchi at coral dot t dot u-tokyo dot ac dot jp
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19007



More information about the Gcc-bugs mailing list