To: dj AT stealth DOT ctron DOT com (DJ Delorie) Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: gcc = gcc -O2 ? Date: Sun, 15 Jan 95 10:38:49 +0200 From: "Eli Zaretskii" > 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 IMHO, the name of the game here is compatibility. It is a de-facto standard in the undustry that C compiler does not optimize unless told so. If this is changing, then DJGPP should also change. If GNU alone are about to change this, then I won't be happy about it, but I don't think we have any alternative but to also change as they would: after all, the least one can expect from a GCC port is to have as consistent a behavior across platforms as the platforms allow. > This came up because someone thought that most PC compilers, by > default, optimized, so gcc should also. I don't think this is so. What compilers are these? > Should -g imply -O0 as the default? Again, no, IMO. Except of the compatibility reason above, this also requires one more thing to remember.