How can I compile to assembly with gcc

I suggest also using -fverbose-asm because then the generated assembler has some generated comments which “explains” the code. For example:

gcc -S -fverbose-asm -O2 foo.c

would generate in foo.s (with some comments) the assembler code produced by compiling foo.c

And to understand what the GCC optimizations are doing one could even try -fdump-tree-all (but this produces hundreds of files!).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)