The information in this article applies to:
SYMPTOMSIn certain situations, the Microsoft Macro Assembler (MASM) version 6.0 will not detect an overflow condition when initializing structure elements. This will most likely occur when the MASM 5.1 compatibility option is used (that is, /Zm on the command line, OPTION M510 in the source code, or when using the MASM driver) and the initialized type is of word size. In cases where the error is not generated but should be, the specified initialization value, modulo the maximum size for the type, is used as the value of the variable. STATUSMicrosoft has confirmed this to be a problem in MASM version 6.0. This problem was corrected in MASM version 6.0a. MORE INFORMATION
In the sample code below, a structure is declared without initializing
the elements in the structure. Later, another structure is declared
that contains the first structure and it initializes the structure to
a value that will create an overflow condition. This error is not
caught by the assembler.
In this particular example, a number in the range of 65536 (010000h) to 65663 (01007fh) will not be caught by the assembler if decimal notation is used. If hex notation is used, the assembler will catch the error. To work around this, either avoid using the MASM 5.1 compatibility options or use hex notation when initializing variables. Sample Code
Additional query words: 6.00 buglist6.00 fixlist6.00a
Keywords : |
Last Reviewed: January 4, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |