This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/32384] New: [4.1/4.2/4.3 regression] Pseudo-dtor in template class rejected
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Jun 2007 23:10:49 -0000
- Subject: [Bug c++/32384] New: [4.1/4.2/4.3 regression] Pseudo-dtor in template class rejected
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following valid code snippet is rejected since GCC 3.4.0:
=====================================================
template<typename> struct A
{
typedef int T;
T foo();
A() { foo().~T(); }
};
A<int> a;
=====================================================
The error message is:
bug.cc: In constructor 'A< <template-parameter-1-1> >::A()':
bug.cc:6: error: expected class-name before '(' token
The code compiles if A is a non-template class, or if I remove the typedef
and call the anonymous template parameter "T" instead.
--
Summary: [4.1/4.2/4.3 regression] Pseudo-dtor in template class
rejected
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: rejects-valid, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32384