[Bug c++/9573] typedef with __attribute__ ((mode(....))) doesnt seem to work inside a struct/class

leblanc at skycomputers dot com gcc-bugzilla@gcc.gnu.org
Wed Jan 12 21:08:00 GMT 2005


------- 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 <stdio.h>
     2  #include <altivec.h>
     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  {
    11    printf ("size = %d\n", sizeof(S < float >::vector_type));
    12    S<float> x;
    13    x.pr_size();
    14    return 0;
    15  }

because it prints

    size = 4
    size = 4


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9573



More information about the Gcc-bugs mailing list