Microsoft KB Archive/115535

From BetaArchive Wiki

FIX: C4713: reg86.c, line 4479, 4600

Q115535

7.00 | 1.00 MS-DOS | WINDOWS kbtool kbfixlist kbbuglist ---------------------------------------------------------------------- The information in this article applies to: - The Microsoft C/C++ Compiler (CL.EXE), included with: - Microsoft C/C++ for MS-DOS, version 7.0 - Microsoft Visual C++ for Windows, version 1.0 ---------------------------------------------------------------------- SYMPTOMS ======== The compiler generates the following internal compiler error message when the sample program below is compiled with /Oez or /Oxz. warning C4713: func: internal compiler error; restarting (compiler file '@(#)reg86.c:1.26', line 4600) warning C4713: func: INTERNAL COMPILER ERROR; restarting (compiler file '@(#)reg86.c:1.26', line 4479) Contact Microsoft Product Support Services The internal compiler error is triggered when you use the global register allocation optimization (/Oe) with maximum loop optimization (/Oz). NOTE: Global register allocation is included with the /Ox compiler option. RESOLUTION ========== The C4713 message is just a warning. The compiler realizes a problem has occurred because of the global register allocation optimization and restarts the compile without the optimization. To avoid the message, either: - Use the fast compiler (/f) instead of using the optimizing compiler -or- - Disable the global register allocation optimization or the maximum loop optimization. This can be done by not using the /Oz, /Oe, or /Ox options on the command line or by using #pragma optimize to disable these optimizations in the source file. The comments in the sample code (in the "MORE INFORMATION" section, below) explain how to use the #pragma to work around the problem. STATUS ====== Microsoft has confirmed this to be a problem in the Microsoft products listed above. This is not a problem in Visual C++, 32-bit Edition. This problem was corrected in Visual C++ version 1.5. MORE INFORMATION ================ The following sample code can be used to demonstrate this problem: Sample Code ----------- /* Compile options needed: /c /f- /Oez */ // Uncomment for work around // #pragma optimize ("e", off) typedef struct tagRecord { long lField1; long lField2; } Record; typedef Record _far * LPRecord; long _far _pascal func1 (void _far *); long _far func2(unsigned, void _far *, LPRecord, void _far *, long); long dwSmag; unsigned _far func( unsigned nParam1, LPRecord lpParam2, LPRecord lpParam3, void _far * lpParam4, long lParam5) { if (func1 (lpParam3)) goto error; if (lpParam4 == 0) lpParam4 = (char _far *)lpParam3 + lpParam3->lField1 + lpParam3->lField2; if (lParam5 == -1) lParam5 = func1 (&dwSmag); func2 ( nParam1, (char _far *)lpParam2 + lpParam2->lField1 + lpParam2->lField2, lpParam3, lpParam4, lParam5 ); error: return 0; } // Uncomment for work around // #pragma optimize ("", on) Additional reference words: 7.00 8.00 1.00 KBCategory: kbtool kbfixlist kbbuglist KBSubcategory: CLIss

Keywords : kb16bitonly kbCompiler
Issue type :
Technology : kbVCsearch kbAudDeveloper kbCVCComp


Last Reviewed: May 5, 2001
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.