This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/10553: [3.4 regression] ICE with undefined template parameter
- From: reichelt at igpm dot rwth-aachen dot de
- To: gcc-gnats at gcc dot gnu dot org
- Date: 29 Apr 2003 19:38:36 -0000
- Subject: c++/10553: [3.4 regression] ICE with undefined template parameter
- Reply-to: reichelt at igpm dot rwth-aachen dot de
>Number: 10553
>Category: c++
>Synopsis: [3.4 regression] ICE with undefined template parameter
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: ice-on-illegal-code
>Submitter-Id: net
>Arrival-Date: Tue Apr 29 19:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: Volker Reichelt
>Release: gcc 3.4-20030402
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
Consider the following code snippet:
----------------------------snip here---------------------------------
template <typename> struct A {};
template <typename> struct B
{
typedef A<typename X::Y> C;
};
----------------------------snip here---------------------------------
Compiling this with mainline I get:
PR8582B.cc:5: error: `X' is not a class-name or namespace-name
PR8582B.cc:5: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]
With gcc 3.2.3 or 3.3 branch I get:
PR8582B.cc:5: error: `X' is not a class or namespace
PR8582B.cc:5: error: `Y' is not a class or namespace
PR8582B.cc:5: error: `X' fails to be a typedef or built in type
PR8582B.cc:5: error: ISO C++ forbids declaration of `type name' with no type
So we have an ice-on-illegal-code (error recovery problem) on mainline
which is a regression w.r.t. 3.3 branch.
>How-To-Repeat:
g++ -c
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: