How do you get assembler output from C/C++ source in gcc?

后端 未结 17 1810
天命终不由人
天命终不由人 2020-11-22 02:43

How does one do this?

If I want to analyze how something is getting compiled, how would I get the emitted assembly code?

17条回答
  •  长发绾君心
    2020-11-22 03:20

    I don't see this possibility among answers, probably because the question is from 2008, but in 2018 you can use Matt Goldbolt's online website https://godbolt.org

    You can also locally git clone and run his project https://github.com/mattgodbolt/compiler-explorer

提交回复
热议问题