This is the mail archive of the gcc@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]

Re: c++/4862 and PRs marked (or not) as parser bugs


"H . J . Lu" wrote:

> I have sent a testcase long time ago:
>
> http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01378.html
>
> Are they the same thing? Here is a patch I have been using without any
> problem. BTW, I have no ideas what I am doing.

:-)

How about c++/5577?? Does it fix this one too?? In that case it would be really nice
to have it for 3.1 too...

Cheers,
Paolo.

//////////////
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;
};
//////////



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