Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Jul 2013 20:19:48 +0200
From:      Tijl Coosemans <tijl@coosemans.org>
To:        David Chisnall <theraven@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r253563 - head/contrib/libstdc++/include/c_std
Message-ID:  <20130725201948.2f5ae808@kalimero.tijl.coosemans.org>
In-Reply-To: <201307231023.r6NANhGf065713@svn.freebsd.org>
References:  <201307231023.r6NANhGf065713@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
On Tue, 23 Jul 2013 10:23:43 +0000 (UTC) David Chisnall wrote:
> Author: theraven
> Date: Tue Jul 23 10:23:43 2013
> New Revision: 253563
> URL: http://svnweb.freebsd.org/changeset/base/253563
> 
> Log:
>   Add isnan() and isinf() to the global namespace in libstdc++'s <cmath>.
>   
>   The standard (n3242, section 17.6.1.1, paragraph 4) says that, because these are
>   declared as macros in the C specification (even though they are
>   implemented as functions in the C++ library) they should be in the global
>   namespace.
>   
>   A surprising number of configure checks rely on this.  It was broken by recent
>   cleanups to math.h.
> 
> Modified:
>   head/contrib/libstdc++/include/c_std/std_cmath.h
> 
> Modified: head/contrib/libstdc++/include/c_std/std_cmath.h
> ==============================================================================
> --- head/contrib/libstdc++/include/c_std/std_cmath.h	Tue Jul 23 05:11:22 2013	(r253562)
> +++ head/contrib/libstdc++/include/c_std/std_cmath.h	Tue Jul 23 10:23:43 2013	(r253563)
> @@ -589,6 +589,8 @@ _GLIBCXX_BEGIN_NAMESPACE(std)
>      { return ::__gnu_cxx::__capture_isunordered(__f1, __f2); }
>  
>  _GLIBCXX_END_NAMESPACE
> +using std::isnan;
> +using std::isinf;
>  
>  #endif /* _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC */
>  #endif

Doesn't this violate C++98/C++03? The quote above is for C++11. I think
the real issue here is that isnan/isinf functions were completely removed
from math.h instead of just hidden for C++11 (with some #if). This also
broke compilation of C code with -D_XOPEN_SOURCE=500.

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (FreeBSD)

iF4EAREIAAYFAlHxbEgACgkQfoCS2CCgtisfDgD/aw+jKaLh4dMzFZp5ytu1Wh0A
1Vq0Rex2lSH3uc6hAagA/RxtmddWxxg2v4gbXybZRd/w7uTS1C0hRlQ679+NF1V4
=OwSC
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130725201948.2f5ae808>