ID: Q115529
1.00 WINDOWS kbtool kbfixlist kbbuglist
The information in this article applies to:
- Microsoft Visual C++ for Windows, version 1.0
The use of global register allocation by the optimizing compiler in the sample code (in the "MORE INFORMATION" section, below) generates the following warning message and prevents the compiler from creating an object module:
test.c(16) : warning C4713: GetDlgFields: internal compiler error
restarting (compiler file '@(#)reg86.c:1.26', line 2934)
There are three workarounds to this problem:
-or-
-or-
#pragma optimize("",off)
void test_func(void)
{
/* ... */
}
#pragma optimize("",on)
Microsoft has confirmed this to be a problem in the Microsoft products listed above. This problem was corrected in Visual C++ version 1.5.
The following sample code demonstrates this problem:
/* Compile options needed: /Oe /c
*/
#include <windows.h>
#include <windowsx.h>
#include <string.h>
BOOL GetDlgFields (HWND hwnd, char *npRec)
{
int i, iLeft = 256, iLen;
for (i = 0; i < 5; i++)
{
iLen = Edit_GetLine (hwnd, i, npRec, iLeft);
if (strstr (npRec, "\r\n"))
iLen -= 2;
npRec += iLen;
*npRec = '\t';
iLeft -= ++iLen;
++npRec;
}
return TRUE;
}
Additional reference words: 1.00 8.00
KBCategory: kbtool kbfixlist kbbuglist
KBSubcategory: CLIss
Keywords : kb16bitonly kbCompiler kbbuglist kbfixlist
Version : 1.00
Platform : WINDOWS
Solution Type : kbfix
Last Reviewed: September 22, 1997