This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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 <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  }


-- 
           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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]