ODR violations in struct RayParams
thiagomacieira opened this issue · 1 comments
thiagomacieira commented
When compiling with LTO, GCC complains:
source/scenequery/src/SqBucketPruner.cpp:1205:16: warning: type ‘struct RayParams’ violates the C++ One Definition Rule [-Wodr]
1205 | struct RayParams
| ^
source/geomutils/src/mesh/GuBV4_CapsuleSweepAA.cpp:46:16: note: a different type is defined in another translation unit
46 | struct RayParams
| ^
source/scenequery/src/SqBucketPruner.cpp:1207:17: note: the first difference of corresponding definitions is field ‘mData2’
1207 | PX_ALIGN(16, PxVec3 mData2); float padding0;
| ^
source/geomutils/src/mesh/GuBV4_CapsuleSweepAA.cpp:48:17: note: a field with different name is defined in another translation unit
48 | BV4_ALIGN16(Vec3p mCenterOrMinCoeff_PaddedAligned);
If they can't be merged, then please rename one of the structs or place one or both of them inside an unnamed namespace.
PierreTerdiman commented
The structures have been moved to anonymous namespaces. The change should appear in a future release.