title: C++ math.h on OS X 10.8.5
body: <p>I have a C++ program that will not compile under OS X 10.8.5 with the g++ compiler. The problem seems to be with the math.h header file. </p>
  
  <p>This is the version of g++ is </p>
  
  <pre><code>g++ -v
  Using built-in specs.
  COLLECT_GCC=g++
  COLLECT_LTO_WRAPPER=/Users/densmore3/local/usr/local/bin/../libexec/gcc/x86_64-apple-darwin14.0.0/4.9.2/lto-wrapper
   Target: x86_64-apple-darwin14.0.0
   Configured with: ../gcc-4.9-20141029/configure --enable-   languages=c++,fortran
   Thread model: posix
   gcc version 4.9.2 20141029 (prerelease) (GCC) 
  </code></pre>
  
  <p>There are 40-50 errors of the type below. The code compiled fine on 10.6. What is going on?</p>
  
  <pre><code>/Users/xxxx/local/usr/local/lib/gcc/x86_64-apple-darwin14.0.0/4.9.2/include-fixed/math.h:203:1: error: ‘__header_always_inline’ does not name a type
  __header_always_inline int __inline_isfinitef(float);
  
  Users/densmore3/local/usr/local/lib/gcc/x86_64-apple-darwin14.0.0/4.9.2/include-fixed/math.h:580:27: error: expected initializer before ‘__AVAILABILITY_INTERNAL__MAC_10_0_DEP__MAC_10_9’
  extern float __inff(void) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_0, __MAC_10_9, __IPHONE_NA, __IPHONE_NA);
  </code></pre>
  
  <p>Here is a piece of test code that gives the same error as my real code. The error goes away if I remove the math.h include statement.</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;math.h&gt;
  #include &lt;stdio.h&gt;
  //#include &lt;complex&gt;
  //#include &lt;vector&gt;
  
  int main(int argc, const char * argv[])
  {
  
      // insert code here...
      std::cout &lt;&lt; "Hello, World!\n";
      return 0;
  }
  </code></pre>
  
  <p>The compile command I am using is:</p>
  
  <pre><code>g++ test.cpp
  </code></pre>