This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/27347] [4.0/4.1/4.2 Regression] static array member specialization failure
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Apr 2006 03:35:44 -0000
- Subject: [Bug c++/27347] [4.0/4.1/4.2 Regression] static array member specialization failure
- References: <bug-27347-10484@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-04-29 03:35 -------
The problem I think is the non specialization is getting in the way in that:
template<class T> char const type_name<T>::name[] = "";
is recording the size as 1.
Another testcase with a slightly different error:
emplate<class T> struct type_name { static int const name[]; };
template<class T> int const type_name<T>::name[] = {0};
template<> int const type_name<int>::name[] = {0, 1, 2, 3};
int f(void)
{
return type_name<int>::name[2];
}
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Known to fail|3.4.6 4.0.3 4.1.0 4.2.0 |3.4.6 4.0.3 4.1.0 4.2.0
| |3.4.0
Last reconfirmed|2006-04-28 13:33:30 |2006-04-29 03:35:43
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27347