[Bug c++/17232] classes and class template specializations treated differently w.r.t. core issue #337

giovannibajo at libero dot it gcc-bugzilla@gcc.gnu.org
Mon Aug 30 20:10:00 GMT 2004


------- Additional Comments From giovannibajo at libero dot it  2004-08-30 20:10 -------
Yes, Cristoph is right. Since the original testcase is a little confusing, this 
is the minimized version posted with my patch:

------------------------------------
template<typename T>
class A { 
  virtual void f() = 0;
}; 
 
template<typename T>
void g(T (*a)[1]) {}

int main() {
  g<A<int> >(0);  // { dg-error "no matching function" }
}
------------------------------------

This should be rejected by a conforming compiler, to the best of my 
understaning, because of [dcl.array]/1 and [temp.inst]/4. EDG fails to reject 
this. I am waiting for language lawyers though before running the patch through 
testing.

I'm CC'ing Jason and GDR, maybe they have a little time to provide some legal 
comments on this.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at redhat dot com, gdr
                   |                            |at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17232



More information about the Gcc-bugs mailing list