This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] MIPS function attributes for interrupt handlers
Thiemo Seufer wrote:
> The ifdef goo goes typically in the implementation of ARCH_MYLOCK,
> declaring function entry/attributes etc. is easy to hide in preprocessor
> macros.
Yes, but why should you have to know that stuff? Why not let the
compiler do it for you?
> AFAICS the best practical reason for __attribute__((naked)) is that it
> allows to stick a mix of C and assembler which logically belongs together
> in the same file.
Yes, that is a benefit. In such situations, it also allows you to make
functions static that might otherwise have to be non-static.
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713