KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q50337: Internal Compiler Error: ctypes.c:1.107, Line 474

Article: Q50337
Product(s): See article
Version(s): 5.10   | 5.10
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | | mspl13_c
Last Modified: 30-NOV-1989

The program below generates the following error when compiled with the
default command-line options under the Microsoft C optimizing compiler
Version 5.10:

   intr.c(12) : fatal error C1001: Internal Compiler Error
                   (compiler file '@(#)ctypes.c:1.107', line 474)
                   Contact Microsoft Technical Support

The following program demonstrates the internal compiler error:

#define  interrupt_number = 0x62     /*  any number will do */

struct interface {
                     int counter;
                     char signature[8];
                 } far interface;

void far*far*interrupt_vector = ( void far * )0L;

int main( void )
{
   /* offending line--invalid */
   interrupt_vector[interrupt_number] = interface;

   /* replace with this line */
// interrupt_vector[interrupt_number] = &interface;
}

The program is not syntactically valid: the offending line attempts to
assign a structure (rather than a pointer to the structure) to a void
function pointer.

Modifying the offending line of code to a pointer rather than a
structure [i.e., using the "address of" operator ("&") on the
interface structure] eliminates the internal compiler error and makes
the program correct.

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.