This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/10639: using an inner class in a template class, G++ can't detect invalid constructor
- From: francois dot delobel at wanadoo dot fr
- To: gcc-gnats at gcc dot gnu dot org
- Date: 6 May 2003 09:01:18 -0000
- Subject: c++/10639: using an inner class in a template class, G++ can't detect invalid constructor
- Reply-to: francois dot delobel at wanadoo dot fr
>Number: 10639
>Category: c++
>Synopsis: using an inner class in a template class, G++ can't detect invalid constructor
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-illegal-code
>Submitter-Id: net
>Arrival-Date: Tue May 06 09:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Francois Delobel
>Release: gcc version 2.95.4 20011002 (Debian prerelease) & gcc 3.2.3 20030415 (Debian prerelease) & version gcc 3.3 20030415 (Debian prerelease)
>Organization:
>Environment:
Linux (debian sarge, 2.4.20-k7, running on AMD XP1900)
>Description:
context: using an inner class in a template class
error: g++ can't detect an incorrect line (constructor returning a value) and exits with internal compiler error.
---- essai.cpp (preprocessed, 30 lines)--
# 1 "essai.cpp"
# 1 "<interne>"
# 1 "<ligne de commande>"
# 1 "essai.cpp"
template <class T>
class C {
public:
class Inner;
C(const T& t);
};
template <class T>
class C<T>::Inner {
public:
Inner();
};
template <class T>
C<T>::C(const T& t)
{ }
template <class T>
T C<T>::Inner::Inner()
{ }
int main()
{
C<int> o(7);
}
>How-To-Repeat:
g++ -Wall -ansi essai.cpp
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: