This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: how small can gcc get?
- From: Mike Stump <mrs at apple dot com>
- To: Dale Johannesen <dalej at apple dot com>
- Cc: gcc at gcc dot gnu dot org, Philip George <invest at juun dot com>
- Date: Sun, 24 Apr 2005 12:12:24 -0700
- Subject: Re: how small can gcc get?
On Sunday, April 24, 2005, at 09:59 AM, Dale Johannesen wrote:
#define optimize 0
"optimize" is a variable and "int 0" won't parse, so that won't come
close.
I didn't see a patch there that I said was complete and survived a
bootstrap. It was a sketch of an idea.
What did you really mean?
Just what I said.
int optimize = 0
trivially becomes:
#ifndef optimize
int optimize = 0;
#endif
I didn't try and go out of my way to be obtuse.
Turning off optimization is not going to get you the smallest code size
We was talking about the size of the compiler binary, not of generated
code. He can evaluate if non-optimal code is permissible in his case,
certainly he left out so many details as to not allow me to guess.
since many optimizations reduce it
? I didn't say that he had to bootstap the compiler, in fact,
obviously, one would want to avoid that, in fact, I did mean it to be
implicit in what I said, as otherwise:
if (optimize)
foo();
would not optimize away to make small code.
...the option intended to produce smallest code is -Os.
Agreed.