[Mesa-dev] [PATCH] nir: no-op C99 _Pragma() with MSVC

Nathan Kidd nathan-ml at spicycrypto.ca
Tue Nov 26 19:27:15 UTC 2019


On 2019-11-23 12:38 p.m., Brian Paul wrote:
> BTW, With gcc 5.4.0, there's a lot of warnings about the pragma not
> being understood:
> 
> ../src/compiler/nir/nir_range_analysis.c:268:0: warning: ignoring
> #pragma GCC unroll [-Wunknown-pragmas]
>     ASSERT_TABLE_IS_COMMUTATIVE(union_table);
>  ^
> ../src/compiler/nir/nir_range_analysis.c:268:0: warning: ignoring
> #pragma GCC unroll [-Wunknown-pragmas]
> ../src/compiler/nir/nir_range_analysis.c:269:0: warning: ignoring
> #pragma GCC unroll [-Wunknown-pragmas]
> 
> I'd have to dig to see what version of gcc added that to add more
> preprocessor tests to silence it.

#pragma GCC unroll is since GCC 8.

"A new pragma GCC unroll has been implemented in the C family of
languages, as well as Fortran and Ada, so as to make it possible for the
user to have a finer-grained control over the loop unrolling
optimization. " -- https://gcc.gnu.org/gcc-8/changes.html


More information about the mesa-dev mailing list