Naked function
A function for which the compiler emits no prologue or epilogue, leaving every instruction — the return included — to the programmer.
Normally the compiler builds a stack frame, saves registers as the calling convention requires and tidies up before returning. With __attribute__((naked)) in GCC and Clang, or __declspec(naked) in MSVC, none of that happens. In practice the body may contain only inline assembly, since ordinary C assumes a stack frame that isn't there.
The use cases are the places where the convention itself is the problem: interrupt vectors, context switches between threads, bootloader entry points and trampolines that must leave registers untouched. MSVC supports it only on 32-bit x86, so a good deal of Windows code had to move its assembly into separate files during the move to x64. Rust stabilised naked functions in 1.88 in 2025, after years of debate about how unsafe something can be before it needs a keyword of its own.