This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19407] vector keyword in typedef inside template struct ignored
- From: "leblanc at skycomputers dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jan 2005 21:29:48 -0000
- Subject: [Bug c++/19407] vector keyword in typedef inside template struct ignored
- References: <20050112212630.19407.leblanc@skycomputers.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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