------- Comment #3 from pinskia at gcc dot gnu dot org 2008-03-28 23:11 ------- We actually accept this code now but reject the following code now: #define __vector __attribute__((vector_size(16))) template <class A> void f(A, __vector A, int);
void g(void) { __vector int a; f<int>(1, a, 2); } Even though we have the attribute here and don't reject it any more, it gets lost when instantiating the template. The testcase in comment #1 works fully correct and we don't lose the attribute as shown by: #define __vector __attribute__((vector_size(256))) template <class A> struct b { __vector A t; }; typedef int g[sizeof(b<int>) == sizeof(__vector int) ? 1 : -1 ]; CCing Jason since he implemented late attribute handling for 4.3.0. -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu dot org Keywords|diagnostic |rejects-valid Summary|diagnostic for vector |vector template argument is |template argument is poor |not fully supported in | |function arguments http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27433