Bug 19440 - Invalid destructor declaration in template class accepted
Summary: Invalid destructor declaration in template class accepted
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: accepts-invalid, monitored
Depends on:
Blocks:
 
Reported: 2005-01-14 11:03 UTC by Volker Reichelt
Modified: 2005-02-10 21:28 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-01-14 13:20:37


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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