c++/3734: G++ 2.95 cannot parse foo <a,b,c>::bar::foobar

khlebnikov@scnsoft.com khlebnikov@scnsoft.com
Thu Jul 19 03:56:00 GMT 2001


>Number:         3734
>Category:       c++
>Synopsis:       G++ 2.95 cannot parse foo <a,b,c>::bar::foobar
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 19 03:56:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     g++
>Release:        gcc version 2.95.4 20010319 (Debian prerelease)
>Organization:
>Environment:
Intel Pentium II 233
Progeny Debian Linux 1.0
GCC:
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20010319 (Debian prerelease)

>Description:
G++ cannot parse complex class hierarchy.
The attached file triggers the error on gcc 2.95.
gcc 3.0 compiles it OK.

====command:
g++ -c error.cpp
====output:
error.cpp: In method `void SSS<IS,OS>::P()':
error.cpp:80: no class template named `SCTS' in `class ST<int,int,int>'
>How-To-Repeat:
see code in error.ii
command: g++ -c error.cpp
>Fix:
==== replace
typedef typename ST <vS, vS, vS> ::CO::I II;
==== with
typedef typename ST <vS, vS, vS> ::CO STCO;
typedef typename STCO::I II;
====
or just compile it with gcc 3.0.
But the problem is that gcc 3.0 cannot compile some other files and ICEs. (Like in my report c++/3728).
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="error.ii"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="error.ii"

IyAxICJlcnJvci5jcHAiCmNsYXNzIFNDQSB7CgpwdWJsaWM6CiAgICB0eXBlZGVmIGludCBJOwp9
OwoKdGVtcGxhdGUgPGNsYXNzIFM+CmNsYXNzIFNDVFMgOiBwdWJsaWMgU0NBIHsKCiAgICBTIHM7
Cn07CgoKdGVtcGxhdGUgPGNsYXNzIFMsIGNsYXNzIFQ+CmNsYXNzIFNQVFMgOnB1YmxpYyB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