KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q61304: CL: Error Output Not Redirected in Certain Cases

Article: Q61304
Product(s): See article
Version(s): 6.00
Operating System(s): MS-DOS
Keyword(s): ENDUSER | buglist6.00 | mspl13_c
Last Modified: 11-JUL-1990

When using the C 6.00 CL command-line compiler under DOS with the
following options

   /B1 C1L.EXE /Zi

the output is not redirected properly (using the DOS stdout redirect
">").

The following code example reproduces the problem:

void main(void)
{
  int i
}

Compile using the following command line (assuming you save the above
in a file called FOO.C):

   cl /B1 C1L.EXE /Zi foo.c > foo.out

The above program contains an error at Line 3 (no semicolon), and the
following error should be generated and sent to the file BUG.OUT:

   foo.c(4) : error C2059: syntax error : '}'

This error text never appears in the file FOO.OUT.

This problem can be worked around by omitting the /Zi option from the
command line, or omitting /B1 C1L.EXE.

Microsoft has confirmed this to be a problem in C version 6.00. We
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.