User account creation filtered due to spam.

Bug 19440

Summary: Invalid destructor declaration in template class accepted
Product: gcc Reporter: Volker Reichelt <reichelt>
Component: c++Assignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: gcc-bugs, mark
Priority: P2 Keywords: accepts-invalid, monitored
Version: 4.0.0   
Target Milestone: 4.0.0   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2005-01-14 13:20:37

Description Volker Reichelt 2005-01-14 11:03:38 UTC
The following IMHO invalid code snippet is accepted
(since at least gcc 2.95.3).

===========================
template<int> struct A
{
    ~A<0>();
};
===========================
Comment 1 Andrew Pinski 2005-01-14 13:20:37 UTC
Confirmed.
Comment 2 Volker Reichelt 2005-02-10 21:28:01 UTC
Fixed on mainline (probably by one of your recent patches, Mark).

Do you want this example as a testcase?
Comment 3 Mark Mitchell 2005-02-10 22:06:25 UTC
Subject: Re:  Invalid destructor declaration in template class
 accepted

reichelt at gcc dot gnu dot org wrote:
> ------- Additional Comments From reichelt at gcc dot gnu dot org  2005-02-10 21:28 -------
> Fixed on mainline (probably by one of your recent patches, Mark).
> 
> Do you want this example as a testcase?

I think the testcase I checked in with the patch is sufficiently 
comprehensive, though I don't object to adding this one too.

Thanks,

Comment 4 CVS Commits 2005-02-19 20:37:03 UTC
Subject: Bug 19440

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	reichelt@gcc.gnu.org	2005-02-19 20:36:57

Modified files:
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/inherit: volatile1.C 
	gcc/testsuite/g++.dg/template: dtor4.C 

Log message:
	PR c++/19299
	* g++.dg/inherit/volatile1.C: New test.
	
	PR c++/19440
	* g++.dg/template/dtor4.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5057&r2=1.5058
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/inherit/volatile1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/dtor4.C.diff?cvsroot=gcc&r1=NONE&r2=1.1