This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about assembly produced by gcc


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]