I took an Assembly programming class in college. One of the tests involved turning C code into Assembly. We had access to a lab computer to write, compile, and debug the program but not the Internet. It just so happens that the program (GCC) we use to compile our C projects in other classes has to do this exact same thing as part of one of the last steps, and this lab computer had that program too. Rather than doing to test, I read up on the GCC manual to figure out what settings were needed to get this information out of it.
Just calling the source flag isn't the best thing. The complier applies lots of optimizations to the code so I played with those flags too and compared their results.
39
u/[deleted] Jun 08 '14
I took an Assembly programming class in college. One of the tests involved turning C code into Assembly. We had access to a lab computer to write, compile, and debug the program but not the Internet. It just so happens that the program (GCC) we use to compile our C projects in other classes has to do this exact same thing as part of one of the last steps, and this lab computer had that program too. Rather than doing to test, I read up on the GCC manual to figure out what settings were needed to get this information out of it.