egcs-1.1.1 on Solaris2.6 bug?

Oleg Zabluda zabluda@math.psu.edu
Sat Dec 5 07:38:00 GMT 1998


In article <3668EB97.47F47028@math.ucla.edu> you wrote:


:   The first package that I tried to compile on Solaris2.6 w egcs-1.1.1
:   gives errors. It complains about the overloaded function

: template <class Sequence>
: void  deleteAllPointersIn(Sequence& s)
: {
:    for (Sequence::iterator it=s.begin();it!=s.end();it++)
:    delete *it;
: }

:    and the error message ---  parse error before `='

:    SunProCC4.2 has no problem with this somehow.
:    Comments anyone? Please cc:imarkov@ucla.edu. Thanks.
 
You must add ``typename'' in front of Sequence::iterator. SunPro
is old and non-compliant.

P.S. Use ++it. This creates one less temporary.

Oleg.




More information about the Gcc-bugs mailing list