This is the mail archive of the
mailing list for the GCC project.
Re: Comments in assember output
After thinking about this some more, I believe the problem is that the
"-S" flag tells the driver (gcc) to stop after the compiler generates
the assembly code. In other words, it never actually runs the assembler.
And since the assembler is the process that generates the listing file,
no listing output is ever generated.
I do not know why the mixed source/assembly listing is generated by the
assembler, rather than the compiler, but I am sure there is a good
technical reason for that, possibly having to do with optimizations made
by the assembler. :)
Solipsys Corporation (http://www.solipsys.com)
Artur Krzysztof Szostak wrote:
cas$ g++ -c -g -O3 -Wa,-ahl=cas.s cas.c
cas$ sed -n /func/,40p cas.s
This works thank you.
But I wonder why should not work with
g++ -S -g -O3 -Wa,-ahl=cas.s cas.c
like I was trying.