FIX: Bad Code Generated for Inline Assembly Using Enumerators (149696)
The information in this article applies to:
This article was previously published under Q149696 SYMPTOMS
When you use an enumerator in an inline assembly statement, incorrect code
will be generated for the enumerator value. The following code fragment
demonstrates the problem:
void main()
{
enum { FALL=1, WINTER, SPRING, SUMMER };
_asm {
mov eax, WINTER ; <--- This will incorrectly load 'eax'
; with something other than 2.
}
}
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. This bug was corrected in Visual C++ 32-
bit Edition version 4.2.
Modification Type: | Major | Last Reviewed: | 10/16/2002 |
---|
Keywords: | kbBug kbcode kbVC420fix KB149696 |
---|
|