title: GCC NOPs being compiled away
body: <p>Venturing out of my usual VC++ realm into the world of GCC (via MINGW32). Trying to create a Windows PE that consists largely of NOPs, ala:</p>
  
  <pre><code>for(i = 0; i &lt; 1000; i++)
  {
      asm("nop");
  }
  </code></pre>
  
  <p>But either I'm using the wrong syntax or the compiler is optimising through them because those NOPs don't survive the compilation process.</p>
  
  <p>I'm using the -O0 flag, otherwise defaults. Any ideas on how I can coax the compiler into leaving the NOPs intact?</p>