On Fri, Jul 4, 2008 at 02:14, me22 <me22.ca@xxxxxxxxx> wrote: > On Fri, Jul 4, 2008 at 01:34, Lee, Newbie <utmw0@xxxxxxxxxxx> wrote: >> 0. Does 'gcc -O2' make functions inline? Yes, but uses a slightly more conservative cost model than O3. It mostly inlines functions that are smaller than the call overhead. >> 1. Is function inlining is dangerous? >> No. But if you are trying to preserver code size, it's better to avoid it. >> 2. Is 'gcc -O3 ' safe? (I heard -O2 is recommended) >> > > Depends on the code. -O3 contains things such as strict aliasing > which is one part of the standard that much code doesn't follow. No. Strict aliasing is on by default at -O2 and -O3. Diego.