KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q66651: _far16 Generated by Mistake for Huge with /Zg

Article: Q66651
Product(s): See article
Version(s): 6.00   | 6.00
Operating System(s): MS-DOS | OS/2
Keyword(s): ENDUSER | buglist6.00 fixlist6.00a | mspl13_c
Last Modified: 1-NOV-1990

If the /Zg switch is used with the Microsoft C version 6.00 compiler,
it will erroneously generate _far16 where huge is required.

Microsoft has confirmed this to be a problem with the C version 6.00
compiler. This problem has been corrected in the version 6.00a
maintenance release.

The /Zg switch causes the compiler to generate prototypes for all the
functions in the module. If a function is declared as

   char huge * foo( char huge *){}

the compiler will generate the following prototype:

   char _far16 * foo (char _far16 *);

Upon subsequent compiling with the generated prototype, the compiler
will fail with various syntax errors because _far16 is an unknown
keyword.

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.