Re: Removing unused code/variables

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

 



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.

> And of course make everything static where possible.

You can use -Wmissing-declarations to find the functions you forgot to
make static.


Segher



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux