This program 1 #include <stdio.h> 2 #include <altivec.h> 3 4 struct s { 5 typedef vector float vf; 6 vf v1; 7 vector float v2; 8 } S; 9 10 int main () { 11 printf ("sizeof(s::vf) is %d\n",sizeof(s::vf)); 12 printf ("sizeof(S.v1) is %d\n",sizeof(S.v1)); 13 printf ("sizeof(S.v2) is %d\n",sizeof(S.v2)); 14 printf ("sizeof(S) is %d\n",sizeof(S)); 15 return 0; 16 }
prints sizeof(s::vf) is 4 sizeof(S.v1) is 4 sizeof(S.v2) is 16 sizeof(S) is 32 I would expect the 4-s to be 16-s. -- Summary: vector keyword in typedef inside struct ignored Product: gcc Version: 3.4.3 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: leblanc at skycomputers dot com CC: gcc-bugs at gcc dot gnu dot org,paavola at skycomputers dot com GCC build triplet: ppc-yellowdog-linux GCC host triplet: ppc-yellowdog-linux GCC target triplet: ppc-yellowdog-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19400