error C2490: 'return' not allowed in function with 'naked' attribute
To my understanding, function declared with "naked" attribute has no (compiler-generated) prolog or epilog.
In other words, the compiler does nothing to grab the function's arguments from the stack (should they be passed on the stack rather than in registers), or to put the return value onto the stack (or into the register where the result is expected) – which explains why a "normal" return is not possible in such function. Also the compiler does nothing to save/restore "callee-saved" registers. You have to do all that in your ASM code...