BUG: C 6.0 /G1 Option Puts .286 Specifier in Assembly Listings

Last reviewed: July 17, 1997
Article ID: Q65331
6.00 | 6.00 | 1.00 1.50 1.51 MS-DOS | OS/2 | WINDOWS kbtool

The information in this article applies to:

  • The C/C++ Compiler (CL.EXE), included with:

        - Microsoft C for MS-DOS and OS/2, version 6.0
        - Microsoft Visual C++ for Windows, versions 1.0, 1.5, and 1.51
    

SYMPTOMS

When using the Microsoft C Compiler version 6.0 or Visual C++ version 1.0 to generate an assembly listing with the /Fa or /Fc option, .286 and .287 processor specifiers are incorrectly inserted when the /G1 option is specified. /G1 should produce .8087 processor code.

This can be seen be compiling the sample code below and viewing the .COD file generated by /Fc (which is also shown below). As a workaround, /G0 may be used instead of /G1.

STATUS

Microsoft has confirmed this to be a bug in the products listed at the beginning of this article. This problem was corrected in C version 6.0a, but reappeared in Visual C++ version 1.0. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Sample Code

/* Compile options needed: /G1 /Fc
*/

void main (void)
{
   int a;

   a = 25;
}

.COD File Generated

;       Static Name Aliases
;
        TITLE   test.c
        .286p               ; Should be blank line
        .287                ; Should be .8087
INCLUDELIB      SLIBCE
_TEXT   SEGMENT  WORD PUBLIC 'CODE'
_TEXT   ENDS
_DATA   SEGMENT  WORD PUBLIC 'DATA'
_DATA   ENDS


Additional reference words: 1.00 1.50 6.00 8.00 8.00c
KBCategory: kbtool kbbuglist
KBSubcategory: CLIss
Keywords : kb16bitonly


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.

Last reviewed: July 17, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.