Louis LeBlanc <[EMAIL PROTECTED]> wrote: > I added the -fstack-check switch to my makefile and recompiled with > various optimizations. I was pretty surprised at the file sizes that > showed up: > > No Optimization: > -rwxr-xr-x 1 leblanc daemon 1128660 Jul 25 16:25 myprocess* > > Optimized with -O2 > -rwxr-xr-x 1 leblanc daemon 1058228 Jul 25 17:36 myprocess* > > Optimized with -O3 > -rwxr-xr-x 1 leblanc daemon 1129792 Jul 25 17:32 myprocess* > > I would have expected much different results. Shouldn't the file > sizes be smaller (at least a little) with the -O3 switch? Maybe > there's a loop unrolled to make it faster, resulting in a larger > codebase?
Or inlining, or many other things. If you care about size, use -Os. -- Giovanni Bajo