Jeff Muizelaar wrote:
The attached patch changes declspec(naked) to __attribute__(cdecl) from __attribute__(naked) As seen in the gcc documentation (http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html#Function%20Attrib...),
__attribute__(naked) does not do the same thing as declspec(naked) instead __attribute__(cdecl) does.
Sure, it does the same.
http://www.cs.cornell.edu/courses/cs412/2001sp/resources/microsoft-calling-c...
This page is wrong.
From MSDN: "The naked storage-class attribute is a Microsoft-specific extension to the C language. The compiler generates code without prolog and epilog code for functions declared with the naked storage-class attribute. Naked functions are useful when you need to write your own prolog/epilog code sequences using inline assembler code. Naked functions are useful for writing virtual device drivers."
-Jeff
- Filip