avr-gcc-list
[Top][All Lists]
Advanced

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

[avr-gcc-list] avr-gcc: -O3 and __attribute__((naked)) doesn't work toge


From: Lin Nan
Subject: [avr-gcc-list] avr-gcc: -O3 and __attribute__((naked)) doesn't work together
Date: Sat, 22 Nov 2008 21:05:44 +0800

I wonder if it is a bug.

Naked functions are return with asm volatile(“ret”). But when compiled with –O3 (which turns on –finline-function), and the naked function is inlined, the ‘ret’ opcode is copied from the naked function to the calling function which returns the calling function.

I wonder what is the proper way to solve this problem, or I just use –fno-inline-functions to disable this feature.


reply via email to

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