|
From: | David Brown |
Subject: | [avr-gcc-list] Re: optimizer removes volatile pin access code. why? |
Date: | Sun, 01 Nov 2009 12:58:24 +0100 |
User-agent: | Thunderbird 2.0.0.23 (Windows/20090812) |
Joerg Wunsch wrote:
Erik Christiansen <address@hidden> wrote:I've tried it with -Os and foo() is still called.Ah, yes, optimisation needs to be used for inline to work.This contradicts the documentation though: `always_inline' Generally, functions are not inlined unless optimization is specified. For functions declared inline, this attribute inlines the function even if no optimization level was specified. As such, it might be worth a bug report.
It might be worth filing a report for a better clarification in the documentation (does that need a bug report?) to make it clearer that "always_inline" has no effect without a normal "inline" declaration.
If Joerg Desch (or someone else) can post a relevant snippet to the list then I can run it through a couple of versions of avr-gcc with different flags, to try to help find the problem.
mvh., David
[Prev in Thread] | Current Thread | [Next in Thread] |