On 18/04/2021 16:30, Segher Boessenkool wrote: > Hi! > > I agree with all this, just two more comments: > > On Sun, Apr 18, 2021 at 04:10:48PM +0200, David Brown wrote: >> On 18/04/2021 00:47, Alexander Shpilkin via Gcc-help wrote: >> There is little difference (IME) about what is dropped or not between >> different variations on optimisation levels (-Os, -O2, -Og). But there >> is a huge difference between -O0 (no optimisation) and -O1. > > -O2 enables inlining, which can be hugely important for code size. It > depends on the style of code. Absolutely. In my coding, it often reduces size - but as you say it is very dependent on coding style. > >> And of course make everything static where possible. > > You can use -Wmissing-declarations to find the functions you forgot to > make static. > Yes, good point. (I do that myself.)