[Bug c++/19400] New: vector keyword in typedef inside struct ignored
This program 1 #include 2 #include 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
[Bug c++/9573] typedef with __attribute__ ((mode(....))) doesnt seem to work inside a struct/class
--- Additional Comments From leblanc at skycomputers dot com 2005-01-12 21:08 --- The bug I reported in #19400, duplicating this one, is fixed in the compiler as of 1/12/04. However, this variant remains busted: 1 #include 2 #include 3 4 template < typename Val > struct S { 5 typedef vector Val vector_type; 6 void pr_size() { printf ("size = %d\n", sizeof(vector_type)); } 7 }; 8 9 int main() 10 { 11printf ("size = %d\n", sizeof(S < float >::vector_type)); 12S x; 13x.pr_size(); 14return 0; 15 } because it prints size = 4 size = 4 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9573
[Bug c++/19407] New: vector keyword in typedef inside struct ignored
-- Summary: vector keyword in typedef inside struct ignored Product: gcc Version: 4.0.0 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 GCC build triplet: ppc-*-linux GCC host triplet: ppc-*-linux GCC target triplet: ppc-*-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19407
[Bug c++/19407] vector keyword in typedef inside template struct ignored
--- Additional Comments From leblanc at skycomputers dot com 2005-01-12 21:29 --- The program below prints 4-s instead of 16-s. 1 #include 2 #include 3 4 template < typename Val > struct S { 5 typedef vector Val vector_type; 6 void pr_size() { printf ("size = %d\n", sizeof(vector_type)); } 7 }; 8 9 int main() 10 { 11printf ("size = %d\n", sizeof(S < float >::vector_type)); 12S x; 13x.pr_size(); 14return 0; 15 } -- What|Removed |Added BugsThisDependsOn||17743 Summary|vector keyword in typedef |vector keyword in typedef |inside struct ignored |inside template struct ||ignored http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19407