title: Unwanted warning message with g++
body: <p>I am trying to write a c++ extension for Ruby. In addition to the main file, I have a file <code>extconf.rb</code>:</p>
  
  <pre><code>require "mkmf"
  $libs += " -lstdc++ "
  create_makefile("file_name")
  </code></pre>
  
  <p>and, after doing <code>ruby extconf.rb</code>, when I try to compile it with <code>g++</code> by typing <code>make</code>, I get the warning:</p>
  
  <pre><code>cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++
  </code></pre>
  
  <p>I read that it is not harmful, but is there a way to avoid this warning? There is a person with the same problem <a href="http://bytes.com/topic/c/answers/819144-c-warning" rel="nofollow">here</a>, but the solution cannot be found.</p>