This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
c++/5577: Parse error (both mainline and newparser)
- From: pcarlini at unitus dot it
- To: gcc-gnats at gcc dot gnu dot org
- Cc: nbecker at fred dot net
- Date: 2 Feb 2002 00:21:23 -0000
- Subject: c++/5577: Parse error (both mainline and newparser)
- Reply-to: pcarlini at unitus dot it
>Number: 5577
>Category: c++
>Synopsis: Parse error (both mainline and newparser)
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Feb 01 16:26:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Paolo Carlini / Neal D. Becker
>Release: 3.1 20020201 & current newparser branch
>Organization:
>Environment:
i686-pc-linux-gnu
>Description:
The following code snippet triggers a parse error @line 26:
////////
template<typename coeftype>
struct IIR {
IIR () {}
template <class outputtype>
outputtype Compute (coeftype x) {
return outputtype();
}
};
// This is Ok.
IIR<double> iir;
double out_iir = iir.Compute<double>(0.0);
// This is Ok.
struct JTC_fading2 {
void Iterate () {
double out_iir = iir.Compute<double>(0.0);
}
IIR<double> iir;
};
// This is NOT Ok.
template<typename rng_t>
struct JTC_fading {
void Iterate () {
double out_iir = iir.Compute<double>(0.0); // <- Error
}
IIR<double> iir;
};
//////////
>How-To-Repeat:
EDG-based C++ compiler have no problem with it.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: