title: How to ignore the following compiler warning?
body: <p>When compiling the following piece of code (g++ 4.6), I get the (expected) warning message:
  <code>./test.cpp:3:7: attention : address of local variable ‘ii’ returned [enabled by default]</code>.</p>
  
  <pre class="lang-cpp prettyprint-override"><code>int *get_ii()  
  {  
    int ii = 2;
    return &amp;ii;
  }
  
  int main(int argc, char* argv[])
  {
    int *ii;
    ii = get_ii();
    return 0;
  }
  </code></pre>
  
  <p>Question: is there a compiler option that would allow me to ignore this warning message at compile time?</p>
  
  <p><strong>Reason</strong>: this is purely for teaching purpose. I'd like to show this piece of code to the audience and ask what's wrong with it. That's why I want to hide the warning message, as it is a big clue.</p>