btQuadWord alignment issue using gcc

Dr.Oetker
Posts: 1
Joined: Wed Apr 15, 2009 7:41 am

btQuadWord alignment issue using gcc

Post by Dr.Oetker »

Hello.

In '/LinearMath/btQuadWord.h' you left a comment:
/**@brief The btQuadWord class is base class for btVector3 and btQuaternion.
* Some issues under PS3 Linux with IBM 2.1 SDK, gcc compiler prevent from using aligned quadword.
*/
Using gcc (psp-g++) I also received the alignment warnings despite the proper directive, but I needed in my code the one universal 'quad word' base class - I noticed that when moved the protected variable declarations
protected:
btScalar m_floats[4];
from the begining to the end of the class definition, gcc seemed to align correctly and gave out no warnings, so the proposed class hierarchy as the main quad word class (btQuadWord<--btVector, btQuaternion) can be achieved :)
Also in memory lookup the addresses were properly aligned.

Hope it helps a bit ;)
Greets