Internal compiler error 364

Massimiliano Giorgi s133102@studenti.ing.unipi.it
Mon Aug 31 16:36:00 GMT 1998


-----BEGIN PGP SIGNED MESSAGE-----


If I compile the following program with "egcs -c -Wimplicit example.cpp"

- ---------- START ----------
#include <stddef.h>
#include <vector>

class Vertex
{
	public:
	Vertex(){};
};

typedef vector<Vertex&> VectorOfVertex;

class Line:public VectorOfVertex
{
	public:
	Line(){};
};

void func(double x,double y)
{
	static Line *ptr=NULL;
	ptr->push_back(Vertex());
}
- ---------- END ----------

this is the result:

example.cpp: In function `void func(double, double)':
example.cpp:21: warning: initialization of non-const reference `class
Vertex &' from rvalue `Vertex'
/usr/include/g++/stl_vector.h: In method `void vector<Vertex
&,__default_alloc_template<true,0> >::push_back(class Vertex &const &)':
/usr/include/g++/stl_vector.h:146: Internal compiler error 364.
/usr/include/g++/stl_vector.h:146: Please submit a full bug report to
`egcs-bugs@cygnus.com'.

the error is in line 10; it must be
typedef vector<Vertex> VectorOfVertex;
without the '&'

I have tried to use the STL library downloaded from www.sgi.com without
result. 

This is the version of egcs I'm using:

Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/egcs-2.90.27/specs
gcc version egcs-2.90.27 980315 (egcs-1.0.2 release)

It's the compiler shipped with RedHat Linux 5.1 (egcs-1.0.2-8.src.rpm).

(Excuse me for my bad English)

	Massimiliano Giorgi

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: latin1

iQCVAwUBNerUmJQOV6yY5PqZAQFYvwP8Dq+szLu97oyXFM4QAFDCCEnqEKBOpiMJ
suqyJkWxcGlVscVa2boKAlCbC0X+1Y/Fx422kowo7Vgl5VeVcjPjVRcDP8+h9TsT
oJkGp9WgzT5c5PvR5xNxAUsf/OkhG1Sc7rSS3iAi20F2pRBYphcqwVxQHPsPWoJ/
lI8b117I2qI=
=IhPy
-----END PGP SIGNATURE-----




More information about the Gcc-bugs mailing list