I still get the itch to look now and then but mostly recoil in horror at how hard it is to relate the code GCC gives me to what I wrote. Typically I have some function I want to review but give up after 10 minutes of searching the listing without finding it. The listing is of course fabulously ugly but that is no change from any other compiler I ever used. I just don't find my code. Well, I do, but it is all in a huge block of raw C code without the corresponding output.
No doubt some cool optimization hoisted my code out of its place in the C code I wrote and dropped it some place which makes sense to the compiler. No doubt all this transformation is good for run time performance or size or something. Perhaps listing quality just isn't an interesting bit of work for compiler writers.
I used to know what those old Windows and SunOS compilers would do with my code but now I have no similar feeling for GCC. I can read what people write about indexing vs. pointers and signed vs. unsigned but I used to really know from first hand observation.
I wish the listing got more respect. It can be a powerful optimization tool.
Maybe I just do it wrong. My makefile has the following incantation for generating listings.
$(CC) $(CFLAGS) $(CPPFLAGS) -g -Wa,-a,-ad -c $< > $@
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds