-S to produce assembly output, adding the -fverbose-asm flag adds extra inline-commentary to the produced file to make it more readable. //
// gcc -S -fverbose-asm verbose-asm.c
// or
// gcc -S -fverbose-asm verbose-asm.c -Os -o
//
#include <stdio.h>
int main() {
int i = 6;
int j = 7;
int k = 6*7;
printf("i=%d, j=%d, i*j=%d\n", i, j, k);
}
proc.s with additional comments: a.out: prog.s gcc $< prog.s: prog.c Makefile gcc -S -fverbose-asm $< -o $@