Compiler Error C2423
Collapse the table of content
Expand the table of content
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

Compiler Error C2423

Error Message

'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
© 2015 Microsoft