jbikker / tinybvh

Single-header BVH construction and traversal library.
MIT License
533 stars 25 forks source link

Extend '-Wmaybe-uninitialized' suppression to GCC. #3

Closed eloj closed 1 month ago

eloj commented 1 month ago

There's a suppression in place for MSVC. Extend it to GCC which also complains, while excluding clang which doesn't.

In the future it may make sense to pre-define 'compiler tests' up front, so there's only one definition of them.

eloj commented 1 month ago

If it was my code I would probably use value-initialization of these structures instead, and do away with the suppressions just for simplicity. Hard to believe this would have any major performance impact.

ALIGNED( 64 ) __m256 bestLBox{}, bestRBox{};            // 64 bytes