title: How to check if my code is getting recompiled in GCC?
body: <p>How can I check if my code is getting recompiled by GCC or not. For example if I type:</p>
  
  <pre><code>g++ -c test.cpp
  </code></pre>
  
  <p>is there a way that GCC tells you that the code is being recompiled in to a new object file because test.cpp has changed. I know I can check the object file's timestamp in terminal but is there an option in GCC which tells you that? Thanks.</p>