You receive a "fatal error C1001" error message when you compile a member function of a class with a missing argument list (240746)



The information in this article applies to:

  • Microsoft Visual C++, 32-bit Enterprise Edition 6.0
  • Microsoft Visual C++, 32-bit Professional Edition 6.0
  • Microsoft Visual C++, 32-bit Learning Edition 6.0

This article was previously published under Q240746

SYMPTOMS

When trying to compile a method of a class by using a missing argument list, the compiler displays the following error:
fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1786)

The line number is 1794 if Visual Studio 6.0 Service Pack 3 installed.

CAUSE

The compiler fails to correctly parse the code and is unable to generate a proper syntax error message.

RESOLUTION

Make sure that you have provided an argument list for all the class member functions.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

This problem was corrected in Microsoft Visual C++ .NET.

MORE INFORMATION

The following code demonstrates the problem:
//Compile options : None.

class CMyClass
{
	public:
	CMyClass(){ }
	int DoNothing();
};

// Missing argument list for the member function.

int CMyClass::DoNothing
{
}

Modification Type:MajorLast Reviewed:6/9/2005
Keywords:kbtshoot kbBug kbCompiler kbfix kbLangCPP kbNoUpdate KB240746 kbAudDeveloper