This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

C++/altivec issue on 3.4 branch




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*)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]