[Mesa-dev] [PATCH] nv50/ra: `isinf()` is in namespace `std` since C++11
Jose Fonseca
jfonseca at vmware.com
Sat Mar 19 22:23:05 UTC 2016
On 18/03/16 04:00, Ilia Mirkin wrote:
>
> On Mar 17, 2016 8:27 PM, "Matt Turner" <mattst88 at gmail.com
> <mailto:mattst88 at gmail.com>> wrote:
> >
> > On Thu, Mar 17, 2016 at 5:17 PM, Pierre Moreau <pierre.morrow at free.fr
> <mailto:pierre.morrow at free.fr>> wrote:
> > > This fixes a compile error while building Nouveau with C++11
> enabled (and
> > > glibc >= 2.23). This happens if SWR is enabled, as it forces C++11.
> >
> > That seems bad, right?
> >
> > Enabling OpenSWR should affect how any other drivers are built. Why
> > does this happen?
>
> Yeah, the fix here is to fix the build not to add random unrelated
> options from one driver when building another.
Although I agree in principle, that drivers should not interfere with
others build, C++14 will soon be the default [1].
So, in this particular case, it seems a missed opportunity not to try to
fix this generically.
What about adding to include/c99_math.h something like
#if __cplusplus >= 201103L
using std::isinf;
#endif
Jose
[1] https://gcc.gnu.org/gcc-6/changes.html
More information about the mesa-dev
mailing list