Skip to content

Commit eb1ae84

Browse files
authored
[geom][mini] Disabling (temporarily) c++20 [[unlikely]] compiler hint. (#17413)
* [geom] Ignoring c++20 attributes when compiling bvh.h * [geom] Ignore c++-20 attributes warning on Windows.
1 parent 34a8b14 commit eb1ae84

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

geom/geom/src/TGeoParallelWorld.cxx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,16 @@ method.
4040
#include <mutex>
4141

4242
// this is for the bvh acceleration stuff
43-
#pragma GCC diagnostic push
44-
#pragma GCC diagnostic ignored "-Wall"
45-
#pragma GCC diagnostic ignored "-Wshadow"
46-
#pragma GCC diagnostic ignored "-Wunknown-pragmas"
43+
#if defined(__GNUC__)
44+
# pragma GCC diagnostic push
45+
# pragma GCC diagnostic ignored "-Wall"
46+
# pragma GCC diagnostic ignored "-Wshadow"
47+
# pragma GCC diagnostic ignored "-Wunknown-pragmas"
48+
# pragma GCC diagnostic ignored "-Wattributes"
49+
#elif defined (_MSC_VER)
50+
# pragma warning( push )
51+
# pragma warning( disable : 5051)
52+
#endif
4753

4854
// V2 BVH
4955
#include <bvh/v2/bvh.h>
@@ -1485,4 +1491,8 @@ void TGeoParallelWorld::TestVoxelGrid()
14851491
}
14861492
}
14871493

1488-
#pragma GCC diagnostic pop
1494+
#if defined(__GNUC__)
1495+
# pragma GCC diagnostic pop
1496+
#elif defined (_MSC_VER)
1497+
# pragma warning( pop )
1498+
#endif

0 commit comments

Comments
 (0)