Closed tksuoran closed 2 months ago
Using JPH_NO_FORCE_INLINE
works around the issue, but I am still curious if there is something better.
I can reproduce this by just building Jolt in debug mode on gcc 14 (doesn't happen in release mode). I think that when specifying -O0
code shouldn't be inlined but it appears that the compiler gets confused and tries to inline these 2 functions anyway and then fails. I've created a workaround in #1099.
Note that it assumes that JPH_DEBUG
will be on when -O0
is specified, but this doesn't need to be true, I did a quick search but can't find a macro that would allow me to detect this in a better way.
I can build Jolt by itself fine using GCC 14. When I try to use Jolt in my own project using CMake fetchcontent, I get the following compilation error with GCC 14:
The compiler arguments may be slightly different from what Jolt uses by itself, even though I've tried to make them compatible.
It seems that
MutableCompoundShape::CastRay()
usesCompoundShape::CastRayVisitor::CastRayVisitor
which is marked withJPH_INLINE
which is defined to__inline__ __attribute__((always_inline))
for clang/GCC.Any suggestions how to deal with this? Thanks!