title: Using GCC to output commented & annotated intermediate files
body: <p>Is it possible to convince GCC to emit an intermediate file which shows:</p>
  
  <ol>
  <li>comments</li>
  <li>original source</li>
  <li>expanded macro definitions</li>
  <li>optimizations applied by compiler</li>
  <li>resulting C or C++ code which will be turned in to assembly code?</li>
  </ol>
  
  <p>I'd rather see intermediate C/C++ instead of assembler, but I can use just assembler too if it's sufficiently annotated.</p>
  
  <p>I am trying to reverse engineer a library composed almost entirely of macros in order to extend it.  I'd also like to see the effects of optimization, in order to give the compiler more opportunities to do more optimization.  (In other words, to see where my previous attempts have been ineffective)</p>