The lower-case -s used to be for stripping executables when linking; are you sure that does anything with assembler? Upper-case -S is for 'generate assembly'.
@JonathanLeffler: both those commands are valid. gcc -S foo.c compiles to foo.s. gcc -s foo.c compiles and links to a stripped binary called a.out. You're correct that using both together is useless (gcc -S -s foo.c), but that's not what the OP said they did.
@PeterCordes — the main point of my comment is that it is pointless to look for assembler files after running gcc filename.c -s — there won't be any generated and kept. Thanks for confirming that -s is nominally for 'stripping the executable'. On my Macs, it (-s) is a no-op, or generates a warning from ld — ld: warning: option -s is obsolete and being ignored.
@JonathanLeffler: oh, yeah I see what you mean. I assume the OP didn't run ls -lrt to see recently-modified files in the directory, and was expecting output to the terminal directly, not a file. That's why I commented about using gcc foo.c -O1 -S -fverbose-asm -masm=intel -o - | less. But yes, -s is an option you definitely don't want to use if you're going to disassemble an executable with objdump -drwC -Mintel a.out | less
filename.s. View it withless. Or use-o -to set the output file to-(which means stdout).-sused to be for stripping executables when linking; are you sure that does anything with assembler? Upper-case-Sis for 'generate assembly'.gcc -S foo.ccompiles tofoo.s.gcc -s foo.ccompiles and links to a stripped binary calleda.out. You're correct that using both together is useless (gcc -S -s foo.c), but that's not what the OP said they did.gcc filename.c -s— there won't be any generated and kept. Thanks for confirming that-sis nominally for 'stripping the executable'. On my Macs, it (-s) is a no-op, or generates a warning fromld—ld: warning: option -s is obsolete and being ignored.ls -lrtto see recently-modified files in the directory, and was expecting output to the terminal directly, not a file. That's why I commented about usinggcc foo.c -O1 -S -fverbose-asm -masm=intel -o - | less. But yes,-sis an option you definitely don't want to use if you're going to disassemble an executable withobjdump -drwC -Mintel a.out | less