Alex Rivera | Logout

Does C++ compile to assembly?

Asked 2011-01-24T06:42:07.327
31

Does C++ code compile to assembly code? If we have C++ code, will we be able to get assembly code?

Edit
Report

1 Answer

6

It depends on the compiler. There are no real rules regarding what C++ compiles into, except at some point it should be able run on a computer. Most compilers have a switch to compile to assembly.

With gcc you can add -S to compile into a .asm file.

For visual studio see: http://codegem.org/2008/10/generate-assembly-from-c-code-in-visual-studio

answered 2011-01-24T06:49:57.077

Your Answer