This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
C++/altivec issue on 3.4 branch
- From: "Timothy J. Wood" <tjw at omnigroup dot com>
- To: gcc at gcc dot gnu dot org
- Date: Sun, 1 Feb 2004 22:01:32 -0800
- Subject: 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*)