This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/11160] New: Inappropriate error message


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: Inappropriate error message
           Product: gcc
           Version: 3.2.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: emild@collectivestudios.com
                CC: gcc-bugs@gcc.gnu.org

Compiling the following example produces this error message:

Prop/test.cpp: In member function `virtual void Enclosing<T>::Child<U>::bar()':
Prop/test.cpp:22: parse error before `;' token

The example is:

template <class T>
class Enclosing
{

	class Base
	{
	public:
		virtual void bar()=0;
	protected:
		template <class U>
		void foo()
		{
		}
	};

	template <class U>
	class Child: public Base
	{
	public:
		virtual void bar()
		{
			this->foo<U>();
		}
	};

};

I am pretty sure this is a valid C++ program.

--Emil


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]