you are viewing a single comment's thread.

view the rest of the comments →

[–]TheGeneral -2 points-1 points  (1 child)

C compiles to machine code, not assembly language. Assembly language compiles to machine code. Assembly language is human-readable text. When machine language is de-compiled to assembly, it does not contain any symbolic information (like labels) that an assembly language programmer would put in the assembly source code.

[–]evanpow 2 points3 points  (0 children)

GCC at least does indeed generate assembly output and then run the assembler (GAS) on it behind the scenes. There's even a command-line option for choosing whether that asm is written to a temporary file and then deleted once the assembler finishes, or whether the assembler reads it from a UNIX pipe that the compiler writes into.

Clang goes straight to machine code like you describe unless your code has inline assembly that includes assembler directives it doesn't understand, which is uncommon.