[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] naked attribute for main() function

From: Dmitry K.
Subject: Re: [avr-gcc-list] naked attribute for main() function
Date: Sat, 22 Dec 2007 15:23:43 +1000
User-agent: KMail/1.5

On Saturday 22 December 2007 02:35, Eric Pasquier wrote:
> Hi All,
> I am using avr-gcc version 4.1.2 (WinAVR 20070525).
> I noticed that the compiler is saving a few registers in the main()
> function, so I used the "naked" attribute.
> Does anybody know if this may cause a problem ?

Yes, the 'naked' attribute can destroy a program.
If shortly, use it only for completely-asm functions.

Try the 'noreturn' attribute. I can't check this
for patched avr-gcc, but in case of pure avr-gcc and
a common (no main) function the result is fine.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]