I found a bug
jesus
jesus@kal-el.ugr.es
Fri Jun 5 12:30:00 GMT 1998
Iôve got this error message compiling a program:
/home/jesus/sources/npi/util/util.h: In function `class ostream &
operator <<(class ostream &, const class NCodeBook<T,L> &)':
In file included from /home/jesus/sources/npi/NPI.h:8,
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ
from prueba.cpp:4:
/home/jesus/sources/npi/util/util.h:7: Internal compiler error.
/home/jesus/sources/npi/util/util.h:7: Please submit a full bug report
to `egcs-bugs@cygnus.com'.
The problem is in this function:
/**
ÃÂ * Standard output for NVector
ÃÂ * @param _sÃÂ The output stream
ÃÂ * @param _cbÃÂ The NCodeBook to be prined
ÃÂ */
template <class T, class L>
ostream& operator << ( ostream& _s, const NCodeBook<T,
L> & _cb )
{
ÃÂ // the first thing must be the size of vectors
ÃÂ _s << _cb[0].size() << " ";
ÃÂ // the second thing must be the number of vectors to be read
ÃÂ _s << _cb.size() << " ";
ÃÂ // the third thing must be if the codebook is calibrated or not
ÃÂ _s << ( _cb.calibrated() ? 1:0 ) << endl;
ÃÂ // and now... the vectors
ÃÂ NCodeBook<T, L>::iterator i;
ÃÂ for (i=begin() ; i<end() ; i++)
ÃÂ {
ÃÂ ÃÂ ÃÂ if (_cb.calibrated())
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ _s << *i << endl;
ÃÂ ÃÂ ÃÂ else
ÃÂ ÃÂ ÃÂ ÃÂ ÃÂ _s << *((NVector<T>*)i) <<
endl;
ÃÂ
ÃÂ return _s;
};
The problem was that IÃÂ omitted the end of block delimiter in the
for sentence,
but I think there is something wrong in the compiler.
àJesús González PeñalverÃÂ
http://gargamel.ugr.es/~jesus
Equipo Geneura.ÃÂ ÃÂ Univ. Granada
http://kal-el.ugr.es
ÃÂ
Tlf: +34-958-243-163
Fax: +34-958-248-993
Móvil: +34-909-926-095
ÃÂ
More information about the Gcc-bugs
mailing list