This documentation is archived and is not being maintained.

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
   }
}
Show: