BUG: C2443 Using Structure Member Operand in _asm BlockLast reviewed: July 24, 1997Article ID: Q125799 |
The information in this article applies to:
SYMPTOMSUnder the four conditions described in this article, the following compiler error is generated:
test.cpp(linenumber) : error C2443: operand size conflictHere linenumber is the assembly instruction in TEST.CPP file that meets the following conditions. This error occurs when the following four conditions are met:
RESOLUTIONIf you are using C++, declare a reference variable initialized with the structure member. Use the reference variable as the source operand in the assembly instruction as shown in this sample code:
Sample Code
/* Compile options needed: /Tp */ struct Test { int nInt; } test1; void main(void) { __asm mov bh, BYTE PTR test1.nInt /* error occurs here */ int & nTest = test1.nInt; /* these lines work */ __asm mov bh, BYTE PTR nTest /* these lines work */ }If you are using C, use a local variable instead of a reference variable.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. |
Keywords : CLngIss kbcode vcbuglist400 vcbuglist500
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |