Mail Archives: djgpp/1995/01/13/19:13:46
>>>>> "sl5h9" == Sliced Bread <Calimath> writes:
sl5h9> On Fri, 13 Jan 1995, DJ Delorie wrote:
>> I've been asked whether it would be a Good Thing for "gcc" to
>> default to "gcc -O2" rather than "gcc -O0", so that if you
>> didn't specify anything, you would get optimization by default.
This strikes me as a bad idea. Altering well-established gcc
semantics would be misleading and confusing. The GNU cc documentation
would suddenly become inaccurate for this one environment. If you
want better benchmark numbers, then enable optimization. If you
really want a gcc that optimizes by default, write a batch script
called "cc" or something that invokes "gcc -O2 -Wall". But please
don't change what "gcc foo.c -o foo" means.
sl5h9> That sounds like a good idea. Are there very many times
sl5h9> when you don't want to optimize, after all?
Of course; whenever you debug. Or when you find that gcc generates
incorrect code at certain optimization levels. Obviously it's not a
major hassle to turn optimization *off*, but it's not a hassle to turn
it *on*, either. I vote to leave gcc's default behavior unchanged and
consistent on all platforms.
-Mat
- Raw text -