From: jmc AT gnu DOT ai DOT mit DOT edu Subject: Re: A few simple Questions To: dj AT ctron DOT com (DJ Delorie) Date: Mon, 8 Aug 1994 15:59:27 -0400 (EDT) Cc: wudavid AT ecf DOT toronto DOT edu, djgpp AT sun DOT soe DOT clarkson DOT edu >> Another Q is when you specify -O4 what exactly does this do? I >> know that it is Optimization level 4, but the docs don't describe O's that >> high. Is it about the same as O2? > >-O4 enables some expensive optimizations. The gcc manual tells which >are which, but "cc1 -version -O4" will tell you what options are enabled. > Let me clarify a little. -O turns on simple optimizations. -O2 turns on everything but -funroll-loops and -finline-functions. (-fomit-frame-pointer will get turned on for machines that don't have a problem debugging without frame pointers). -O3 as of 2.6.0 will turn on -finline-functions. Anything above that does nothing more. The code for checking is real simple and is just == 2, >= 3 checks. -O4 won't do anything more than -O3 in reality then. James