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