Export (0) Print
Expand All
Expand Minimize

Compiler Error C2489

'identifier' : initialized auto or register variable not allowed at function scope in 'naked' function

For more information, see naked (C++).

The following sample generates C2489:

// C2489.cpp
// processor: x86
__declspec( naked ) int func() {
   int i = 1;   // C2489
   register int j = 1;   // C2489
}

Community Additions

ADD
Show:
© 2014 Microsoft