This documentation is archived and is not being maintained.

Compiler Error C2490

'keyword' not allowed in function with 'naked' attribute

A function defined as naked cannot use structured exception handling.

The following sample generates C2490:

// C2490.cpp
// processor: x86
__declspec( naked ) int func() {
   __try{}   // C2490, structured exception handling
}
Show: