KnowledgeBase Archive

An Archive of Early Microsoft KnowledgeBase Articles

View on GitHub

Q65329: QC 2.0x Incorrectly Stores Uninitialized Global Data in DGROUP

Article: Q65329
Product(s): See article
Version(s): 2.00 2.01
Operating System(s): MS-DOS
Keyword(s): ENDUSER | buglist2.00 fixlist2.50 | mspl13_c
Last Modified: 31-AUG-1990

Microsoft QuickC version 2.00 and Microsoft QuickAssembler version
2.01 both store uninitialized global data in the default data segment
for the program (DGROUP). This is an error for compact and large model
programs according to standard Microsoft segment-ordering conventions.
In versions 2.50 and 2.51, this was corrected and uninitialized global
data is now stored in FAR_BSS for compact and large models.

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

int global;

void main()
{}

To see this concept demonstrated, compile the above program under
QuickC versions 2.0x and 2.5x. If the .MAP file from each is examined,
the results will be obvious.

Microsoft has confirmed this to be a problem with QuickC version 2.00.
This problem was corrected with QuickC versions 2.50 and 2.51.

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.