[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Automatic inline vs size
From: |
Joerg Wunsch |
Subject: |
Re: [avr-gcc-list] Automatic inline vs size |
Date: |
Sat, 17 Mar 2007 21:25:46 +0100 (MET) |
Ben Jackson <address@hidden> wrote:
> GCC is often wrong when it guesses, because I will do things like
> inline a giant init function because I just want the code to go into
> main, while I keep it in a separate function for readability.
Declare it "static" then, so GCC doesn't have to keep a second copy of
it. That way, inlining will actually optimize both, make it smaller
*and* faster.
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)