FIX: C1001 When Calling Base Class Conversion OperatorLast reviewed: September 19, 1997Article ID: Q141457 |
|
4.00
WINDOWS NT
kbprg kbbuglist kbfixlist kbcode
The information in this article applies to:
SYMPTOMSCompiling a C++ file that contains an explicit call to a base class conversion operator, with the /FR compiler option (create Browser information) may result in the following fatal compiler error:
C:\Test\Test.Cpp(22) : fatal error C1001: INTERNAL COMPILER ERROR (compiler file 'msc1.cpp', line 899) RESOLUTIONThere are two possible workarounds:
Sample Code
/* Compile options needed: /FR
*/
class Base
{
public:
operator int()
{
return 0;
}
};
class Derived : public Base
{
int fun()
{
return Base::operator int();
// The following line is a workaround for the
// previous line that fails.
// return int(*((Base*)this));
}
};
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++ 4.1.
|
Additional reference words: 4.00 10.0 4.10 10.10 ICE
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |