Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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.