this makes it difficult to use with high level language, so I made a class.
to make sure that the function are issued inline in VS I us ethe extended keyword __forceinline
and this work very well.
with GCC is difcult to see what is inline and what is not, in fact almost all function are isse as funtion call, so I nee to use a similart funtion
the have this attibute for that:
- Code: Select all
#define DG_INLINE __attribute__((always_inline))
//#define DG_INLINE inline
however when I try to compile I get this error message
In file included from ../../source/core/dgSphere.cpp:25:
../../source/core/dgTypes.h:657: sorry, unimplemented: inlining failed in call to ‘dgFloat32 dgAbsf(dgFloat32)’: function not inlinable
../../source/core/dgSphere.h:94: sorry, unimplemented: called from here
../../source/core/dgTypes.h:657: sorry, unimplemented: inlining failed in call to ‘dgFloat32 dgAbsf(dgFloat32)’: function not inlinable
../../source/core/dgSphere.h:94: sorry, unimplemented: called from here
../../source/core/dgTypes.h:657: sorry, unimplemented: inlining failed in call to ‘dgFloat32 dgAbsf(dgFloat32)’: function not inlinable
../../source/core/dgSphere.h:94: sorry, unimplemented: called from here
make: *** [../../source/core/dgSphere.o] Error 1
an error at the very function that uses the modifier DG_INLINE
has anyone try using __attribute__((always_inline)) with GCC.
I have being looking in teh net for peopel with similar error, and they are ton of then, but every one solve by Not using it
Only in one site I read someone say it as a but with GCC 4 but only for template inline, they say it was fixe and no more comment.
I do not know what to do form here, the class require those functions to be inline.
I also saw the teh ARM commplie make thier own __inline__ extension to GCC like Microsoft and Intell, but that doe no work on nor arm mode for GCC.