This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

c++/5577: Parse error (both mainline and newparser)



>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:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]