--- linuxsampler/trunk/src/common/global_private.h 2013/09/15 17:55:56 2473 +++ linuxsampler/trunk/src/common/global_private.h 2014/06/07 00:16:03 2600 @@ -57,6 +57,13 @@ typedef float v4sf __attribute__ ((vector_size(16))); #endif +// circumvents a bug in GCC 4.x which causes a sizeof() expression applied +// on a class member to throw a compiler error, i.e. with GCC 4.4: +// "object missing in reference to 'LinuxSampler::AbstractEngineChannel::ControllerTable'") +// or with GCC 4.0: +// "invalid use of non-static data member 'LinuxSampler::AbstractEngineChannel::ControllerTable'" +#define _MEMBER_SIZEOF(T_Class, Member) sizeof(((T_Class*)NULL)->Member) + /** * Whether a function / method call was successful, or if warnings or even an * error occured.