ID Number: Q85501
7.00
MS-DOS
buglist7.00
Summary:
PROBLEM ID: C9206004
SYMPTOMS
If the code below is compiled with any compiler options, the
following error occurs:
fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 730)
Contact Microsoft Product Support Services
The code declares a __huge new operator. The problem occurs when
certain constant numbers are given as a parameter to "operator new".
RESOLUTION
To work around the problem, assign the constant to a temporary
variable and pass it as a parameter to operator new (see the
commented section in the code below).
STATUS
Microsoft has confirmed this to be a problem in C/C++ version 7.0.
We are researching the problem and will post new information here
as it becomes available.
More Information:
Sample Code
-----------
/* Compile options needed: none
*/
#include <malloc.h>
void __huge * operator new( unsigned long elems, size_t size )
{
return halloc( elems, size );
}
void operator delete( void __huge *hgptr )
{
hfree( hgptr );
}
void main( )
{
char __huge *ptr;
// unsigned long t = 10000; // To work around the problem,
// ptr = new __huge(t) char; // use these two lines instead.
ptr = new __huge(10000) char;
delete ptr;
}
Additional reference words: 7.00