Closed Quuxplusone closed 13 years ago
This is AFAIK a bug in Apple's math.h headers. See
<http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-August/010176.html>:
| I had to add an additional tweak to the cmath header for OSX when
| building with Clang with -std=c++0x, as that flag disables the GNU
| extensions mode and defines __STRICT_ANSI__, and the current math.h
| headers with OSX/iOS (Xcode 3.2.3) don't bring in a number of the C99
| math functions when __STRICT_ANSI__ is defined.
I solved the problem by changing the buggy math.h on my system.
You are correct that 'c++0x' is used to enable C++0x support. Clang works as
expected here.
@Howard: Close this bug? (after filing a radar for math.h)
Closed. Bug has been filed (and fixed) for math.h on OS X.
A simple:
include
does not work on mac os x 10.6, with clang -std=c++0x or clang -std=c++93. It works fine with -std=gnu++0x and -std=gnu++93.
I had assumed that -std=c++0x was the 'natural' extension to get c++0x support. I can see I should probably be using gnu++0x. That is an unfortunate choice of naming (but probably clang's fault).