This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Question about assembly produced by gcc
- From: Ian Lance Taylor <ian at airs dot com>
- To: Yannis Haralambous <yannis dot haralambous at enst-bretagne dot fr>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 19 Dec 2005 14:21:24 -0800
- Subject: Re: Question about assembly produced by gcc
- References: <876B69FA-E1CC-4641-BEC9-50032A8136B9@enst-bretagne.fr>
Yannis Haralambous <yannis.haralambous@enst-bretagne.fr> writes:
> Hi, I have a small question about assembler code generated by gcc:
> when I compile the trivial program main () {} with gcc -O0 I get the
> following lines
At -O0 gcc puts absolutely no effort into generating optimal code.
It's not generally all that interesting to ask why the -O0 code is
bad. It is normally just because there is some general optimizer
which will improve it, but that optimizer is not run at -O0.
Please feel free to ask about generated code at -O1 or higher.
Ian