This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/17232] classes and class template specializations treated differently w.r.t. core issue #337
- From: "cludwig at cdc dot informatik dot tu-darmstadt dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Aug 2004 18:57:23 -0000
- Subject: [Bug c++/17232] classes and class template specializations treated differently w.r.t. core issue #337
- References: <20040829175551.17232.cludwig@cdc.informatik.tu-darmstadt.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From cludwig at cdc dot informatik dot tu-darmstadt dot de 2004-08-29 18:57 -------
Subject: Re: classes and class template specializations treated differently w.r.t. core issue #337
On Sun, Aug 29, 2004 at 06:42:54PM -0000, bangerth at dealii dot org wrote:
>
> I don't presently have the time to figure things out, but here are
> a few data points:
> gcc2.95, 3.2.3, and 3.3.4 return 1
> gcc3.4.1, gcc mainline, and icc8 return 0
>
> Note also that the declaration
> int g(T (*)[1])
> is taking an argument of type pointer to array of T. However, as the
> types you use are abstract, there can't be any arrays of these types
> and this declaration should probably never match.
I agree.
> That doesn't invalidate your point, though, that the compiler should
> probably treat template instances and non-template classes equivalently.
To avoid misunderstandings: gcc 3.3.1 also returns 1. But if you
change the return statement into
return (g< A<int> >(0) == 1) && (g< B >(0) == 1);
then the executable generated by gcc 3.3.1 returns 0 because
gcc 3.3.1 does not implement the resolution of core issue 337 at all.
Regards
Christoph
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17232