Mail Archives: djgpp/1995/01/13/19:15:04
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. The reason is that
[ ... etc ...]
Should -g imply -O0 as the default?
I don't think so. Ghostscript uses "gcc" rather than "gcc -O0" in a
couple of cases where optimization is (was) known to break certain
code on certain (non-80x86) versions of the compiler. While there's
no reason to suppose this is a problem (currently) with DJGPP, there's
also no reason to be sure (a) such a bug won't be introduced in a
later GCC---in which case the changed default switch will make the
workarond a little harder to remember and different from other GCCs
and (b) no such problem exists in C++/Objective-C which we know to be
unstable.
I think consistency with other GCCs is sufficient reason on to
change (especially since we expect Linux and DJGPP to produce
identical objects in the near future).
--Steve
- Raw text -