[Mesa-dev] [PATCH] nv50/ra: `isinf()` is in namespace `std` since C++11

Jose Fonseca jfonseca at vmware.com
Wed Apr 13 10:26:03 UTC 2016


On 13/04/16 11:21, Ilia Mirkin wrote:
> Gah, no :(

Feel free to revert it.  I lost a lot of time on this already.  I pushed 
this out of courtesy to nouveau to avoid build failures until we figure 
out how to get a generic version to work reliably.

> He even sent a patch which did this generally, what was wrong with that one?

Please read my reply this morning, on the thread "Re: [Mesa-dev] [PATCH 
v2] math: Import isinf and others to global namespace"

Jose

>
> On Apr 13, 2016 3:07 AM, "Jose Fonseca" <jfonseca at vmware.com
> <mailto:jfonseca at vmware.com>> wrote:
>
>     Pierre, I'm going to commit this one for now, as it seems the safest
>     thing to do.
>
>     I still think we should try to fix the generic case, but it seems
>     much harder to get this right.  I still don't understand how come
>     isinf sometimes appears in the global namespace some times, but not
>     others.
>
>     Jose
>
>     On 18/03/16 00:17, Pierre Moreau 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.
>
>         Signed-off-by: Pierre Moreau <pierre.morrow at free.fr
>         <mailto:pierre.morrow at free.fr>>
>         ---
>            src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 4 ++++
>            1 file changed, 4 insertions(+)
>
>         diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
>         b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
>         index 500ab89..1b595ae 100644
>         --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
>         +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
>         @@ -1327,7 +1327,11 @@ GCRA::simplify()
>                           bestScore = score;
>                        }
>                     }
>         +#if __cplusplus >= 201103L
>         +         if (std::isinf(bestScore)) {
>         +#else
>                     if (isinf(bestScore)) {
>         +#endif
>                        ERROR("no viable spill candidates left\n");
>                        break;
>                     }
>
>
>     _______________________________________________
>     mesa-dev mailing list
>     mesa-dev at lists.freedesktop.org <mailto:mesa-dev at lists.freedesktop.org>
>     https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>



More information about the mesa-dev mailing list