egcs-1.1.1 on Solaris2.6 bug?

Igor Markov imarkov@math.ucla.edu
Sat Dec 5 01:17:00 GMT 1998


Philipp Rumpf wrote:
> 
> On Sat, Dec 05, 1998 at 12:35:14AM -0800, Igor Markov wrote:
> >   it appears to stumble at the first one:
> >
> > abktempl.h
> >      52 template <class Sequence>
> >      53 void  deleteAllPointersIn(Sequence& s)
> >      54 {
> >      55    for (Sequence::iterator it=s.begin();
> >      56            it!=s.end();it++)
> >      57    delete *it;
> >      58 }
> >
> > abktempl.h:55: parse error before `='
> 
> Does it fail if you take the declaration out of the for construct ?
> I do not have the release version of egcs here and my snapshot is hacked,
> but it looks like the prepocessor not getting the <type> name = <expr>
> right ...

   If I take the  "Seque... begin()" off I get the same error at that line.
   If I split the line into

         55   Sequence::iterator it;
         56                      it=s.begin();
   I get 
       abktempl.h:55: parse error before `;'
  
  I suspect it simply doesn't get Sequence:iterator

-- 
								Igor
--------------------------------------------------------------------
What should you do if you see an endangered animal eating an 
endangered plant?



More information about the Gcc-bugs mailing list