title: g++ (MinGW), C++11 and SSE
body: <p>When I try to compile the next simple example of code:</p>
  
  <pre><code>echo "#include &lt;cmath&gt;" | g++ -x c++ -c - -m64 -mfpmath=both -std=gnu++11 -o /dev/null
  </code></pre>
  
  <p>(along with <code>-m64</code> option is activated (by default) a using of <strong>SSE</strong> (say, <strong>AVX</strong>)).</p>
  
  <p>It is appear the following error message:</p>
  
  <pre><code>In file included from &lt;stdin&gt;:1:0:
  c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../include/c++/4.7.2/cmath:1040:11: error: '::double_t' has not been declared
  c:\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../include/c++/4.7.2/cmath:1041:11: error: '::float_t' has not been declared
  </code></pre>
  
  <p>Is this a bug?</p>
  
  <p>Without <code>-mfpmath=both</code> option an error does not happen.</p>
  
  <p>My workaround is to add the <code>-D__FLT_EVAL_METHOD__=2</code> (and <code>-Wp,-w</code> if <code>-Werror</code> is present, because of "is redefined" warning) to <strong>g++</strong>'s option list. I think that this is a dirty way.</p>