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: Comments in assember output


Artur,

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. :)

--
Tony Wetmore
Solipsys Corporation (http://www.solipsys.com)
mailto:tony.wetmore@solipsys.com


Artur Krzysztof Szostak wrote:
Something like
<transcript>
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.



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