C9111002: C1001: regMD.c, Line 3462

ID Number: Q78622

6.00a 6.00ax | 6.00a

MS-DOS | OS/2

buglist6.00a buglist6.00ax

Summary:

PROBLEM ID: C9111002

SYMPTOMS

Microsoft C versions 6.0a and 6.0ax generate an internal compiler

error when the following sample code is compiled with global

register optimization (/Oe) in all memory models except huge (/AH).

file.c(21) : fatal error C1001: Internal Compiler Error

(compiler file '@(#)regMD.c:1.110', line 3462)

Contact Microsoft Product Support Services

RESOLUTION

To avoid this problem, do one of the following:

1. Use any optimizations that do not use /Oe or /Ox, or turn off

global register optimization using these pragmas:

#pragma optimize ("e", off)

{ code }

#pragma optimize ("e", on)

-or-

2. Use huge (/AH) memory model.

-or-

3. Compile using the Quick Compile (/qc) option.

STATUS

Microsoft has confirmed this to be a problem in Microsoft C

versions 6.0a and 6.0ax. We are researching this problem and will

post new information here as it becomes available.

More Information:

Sample Code

-----------

/* Compile options needed: /Oe

*/

#include <stdio.h>

void Decode(unsigned char * buf, int j)

{

printf("%x%s", buf[j],((buf[j] & 0x07) ? "" : ""));

if (buf[j])

printf ("W");

printf("%x%s", buf[j],((buf[j] & 0x7f) ? "" : ""));

if (buf[j])

printf ("U");

printf("%x%s", buf[j],((buf[j] & 0x1f) ? "" : ""));

if (buf[j])

printf ("N");

/* Compiler error occurs on the next line. */

printf("%x%s", buf[j],((buf[j] & 0x07) ? "" : ""));

if (buf[j])

printf ("P");

}

Additional reference words: 6.00a 6.00ax