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++/17232] classes and class template specializations treated differently w.r.t. core issue #337


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


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