Compiler Error C2423
Visual Studio 2015
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at Compiler Error C2423.
number' : illegal scale
Inline assembly code uses a number other than 1, 2, 4, or 8 to scale a register.
The following sample generates C2423:
// C2423.cpp
// processor: x86
int main() {
_asm {
lea EAX, [EAX*3] // C2423
lea EAX, [EAX+EAX*2] // OK
}
}
Show: