C++/altivec issue on 3.4 branch

Timothy J. Wood tjw@omnigroup.com
Mon Feb 2 06:01:00 GMT 2004



   C++ functions returning vector values don't seem to be working on the 
head of the 3.4 branch.  Am I doing something dumb, or is this actually 
a bug (or known missing feature)?

-tim


#include <altivec.h>

class Constants {
     vector unsigned int _pack0;
public:
     Constants() {
         _pack0 = (vector unsigned int){0xdeadbeef, 0xabababab, 
0x55555555, 0x12345678};
     };

     inline vector unsigned int deadbeef(void) const {
         return vec_splat(_pack0, 0);
     };
};

vector unsigned int const_deadbeef(Constants &C)
{
     return C.deadbeef();
}


av.cpp: In function `unsigned int __vector__ 
const_deadbeef(Constants&)':
av.cpp:17: error: no matching function for call to 
`Constants::deadbeef()'
av.cpp:10: note: candidates are: unsigned int __vector__ 
Constants::deadbeef(const Constants*)



More information about the Gcc mailing list