title: How to turn off gcc compiler optimization to enable buffer overflow
body: <p>I'm working on a <a href="https://stackoverflow.com/questions/2333909/c-how-can-i-invoke-buffer-overflow-hw-problem-not-hacking">homework problem</a> that requires disabling compiler optimization protection for it to work. I'm using gcc 4.4.1 on ubuntu linux, but can't figure out which flags are are the right ones. I realize it's architecture dependant - my machine runs w/ 32-bit Intel processor.</p>
  
  <p>Thanks.</p>