Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to see the intermediate code generated during the compilation of a C program. Using the -S flag, the object code is generated but is there anything to see the .i files, called as intermediate code.

share|improve this question
    
have you tried $cat filename.i ? –  VRU Jan 12 '13 at 8:31

1 Answer 1

If this is gcc* you also need -save-temps after -S

gcc -S -save-temps file.cpp would make file.i


* By default, gcc is installed and linked to cc. If you install another C Compiler, cc will link to that.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.