std::log2 not in c++11 on 10.6 BuiltBot?
Mihai Moldovan
ionic at macports.org
Wed Apr 22 17:46:18 PDT 2015
On 23.04.2015 01:39 AM, Michael Dickens wrote:
> Interesting; the macro is actually "_GLIBCXX_USE_C99_MATH_TR1", with
> just 1 preceding "_"; at least on my 10.8 & 10.10 installs.
Err, sorry. Yes.
> This macro is set at
> "/opt/local/include/gcc49/c++/x86_64-apple-darwin12/bits/c++config.h:1276"
> on my install, which is part of the configuration of GCC. So, I'd guess
> this macro is not set on the 10.6 build of GCC49. No idea why not.
This seems to be the case whenever math.h does not include all functions needed for C++11 (TR1 and non-TR1) math support in the std namespace.
I suspect some C99 functions are missing from math.h on 10.6, but 10.7 (probably? I'd expect so because it's a first time libc++ was shipped with OS X) and higher have them.
> Oddly, the comment for this macro is:
> {{{
> /* Define if C99 functions or macros in <math.h> should be imported in
> <tr1/cmath> in namespace std::tr1. */
> }}}
> but it is clearly used in /opt/local/include/gcc49/c++/cmath to
> determine whether most of the math functions from math.h are declared in
> std:: or not (not just std::tr1::). There's also c++/tr1/cmath, which to
> a high degree replicated the functionality of c++/cmath but for
> std::tr1::.
Yeah, well, probably just used in both places because TR1 and C++11 both require all C99 functions to be declared.
> Quite odd!
>
> Anyway, I think I'll just ignore this issue since it's only on 10.6 &
> nobody has complained about it ;)
That's probably a safe bet. It might be interesting to know what libc++ and clang do on 10.6 regarding this, though. But I'm not going to bring my system to its knees with the 10.6 VM again just to investigate this question right now...
Mihai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 884 bytes
Desc: OpenPGP digital signature
URL: <https://lists.macosforge.org/pipermail/macports-dev/attachments/20150423/ed7922a7/attachment.sig>
More information about the macports-dev
mailing list