How to disable compiler optimizations in gcc?

后端 未结 7 822
误落风尘
误落风尘 2020-12-07 11:07

I am trying to learn assembly language. I have searched and found how to disassemble a .c file but I think it produces some optimized version of the program. Is

相关标签:
7条回答
  • 2020-12-07 11:50

    Use the command-line option -O0 (-[capital o][zero]) to disable optimization, and -S to get assembly file. Look here to see more gcc command-line options.

    0 讨论(0)
提交回复
热议问题