ID Number: Q65300
6.00 | 6.00
MS-DOS | OS/2
buglist6.00 fixlist6.00a
Summary:
The Microsoft C Compiler version 6.0 produces the following internal
compiler error when the sample program below is compiled with global
register allocation (/Oe):
file.c(): fatal error C1001: Internal Compiler Error
(compiler file) '@(#)regMD.c:1.100', line 3431
Contact Microsoft Product Support Services
Microsoft has confirmed this to be a problem in C version 6.0. This
problem was corrected in C version 6.0a.
Note that a signed bit-field makes no sense, and when changed to
unsigned, this code compiles correctly. Disabling global register
allocation or adding an optimize pragma to turn off the function will
also work around the error in C 6.0.
Sample Code
-----------
/* Compile options needed: /Oe
*/
typedef struct {
char DispCon:1;
char DispMon:1;
char Flash:1;
char Tones:1;
char TonInt:1;
} tTVsetup;
void CopyTVsetup(tTVsetup dest[], tTVsetup src[])
{
int calltype;
for (calltype = 0; calltype < 5; calltype ++)
{
dest[calltype].TonInt = src[calltype].TonInt;
dest[calltype].DispCon = src[calltype].DispCon;
dest[calltype].DispMon = src[calltype].DispMon;
dest[calltype].Flash = src[calltype].Flash;
dest[calltype].Tones = src[calltype].Tones;
}
}