KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q65300: C1001: Internal Compiler Error: ‘@(#)regMD.c:1.100’, Line 3431

Article: Q65300
Product(s): See article
Version(s): 6.00   | 6.00
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | buglist6.00 | mspl13_c
Last Modified: 7-SEP-1990

When compiled with the /Ox option, the code below generates the
following internal compiler error:

   fatal error C1001: Internal Compiler Error
   (compiler file) '@(#)regMD.c:1.100', line 3431
   Contact Microsoft Product Support Services

Sample Code
-----------

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;
   }
}

Note that a signed bit-field makes no sense, and when changed to
unsigned, this code compiles correctly. The "e" optimization seems to
be causing this error. Not using it on the command line or adding an
optimize pragma to turn off the function will work as a workaround.

Microsoft has confirmed this this to be a problem with C version 6.00.
We are researching this problem and will post new information here as
it becomes available.

THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Copyright Microsoft Corporation 1986-2002.