Internal compiler error 980521
Michael Rinne
Michael.Rinne@neuroinformatik.ruhr-uni-bochum.de
Fri Oct 2 07:46:00 GMT 1998
Hi,
I am sending this bug report to you, because GNU CC outputs:
Internal compiler error 980521.
Please submit a full bug report to `egcs-bugs@cygnus.com'.
I included all the information you requested in gcc.info section
`Bug Reporting'. I am aware of the fact that this internal compiler error
occures only if I use the option `-Weffc++' in the call to `g++'.
Best regards,
Michael Rinne
version of GNU CC:
gcc version egcs-2.91.57 19980901 (egcs-1.1 release)
input: (simplified example of much larger input)
#include <vector>
template <class Type> class Vector : public vector<Type>
{
public:
Vector(int size) : vector<Type>() { resize(size); };
};
template <class Type> class Point
{
Type x;
Type y;
public:
Point() : x(0), y(0) {};
};
struct Node
{
Point<int> point;
};
int main()
{
Vector<Node> nodeVector(10);
return 0;
}
preprocessed input: (g++ -E input.C | grep -v '^[ ]*$')
attached to this mail (compressed with gzip)
command arguments:
g++ -Weffc++ input.C
type of machine:
Manufacturer is Sun (Sun Microsystems)
System Model is Ultra 2 Model 2170
Main Memory is 576 MB
ROM Version is OBP 3.7.0 1997/01/09 13:06
Number of CPUs is 2
CPU Type is sparc
App Architecture is sparc
Kernel Architecture is sun4u
OS Name is SunOS
OS Version is 5.6
Kernel Version is SunOS Release 5.6 Version Generic_105181-08 [UNIX(R) System V Release 4.0]
operands to the `configure' command:
../egcs-1.1b/configure --with-gcc-version-trigger=/local/tmp/gnu/egcs-1.1b/gcc/version.c --host=sparc-sun-solaris2.6 --prefix=/opt/gnu --with-local-prefix=/opt/gnu --enable-shared --enable-threads --norecursion
complete list of any modifications:
none
details of any other deviations from the standard procedure for
installing GNU CC:
none
description of observed behavior: (output of `g++ -Weffc++ input.C')
In file included from /opt/gnu/include/g++/stl_algobase.h:53,
from /opt/gnu/include/g++/vector:30,
from test.cc:1:
/opt/gnu/include/g++/iostream.h:112: warning: `class ostream' has pointer data members
/opt/gnu/include/g++/iostream.h:112: warning: but does not override `ostream(const ostream&)'
/opt/gnu/include/g++/iostream.h:112: warning: or `operator=(const ostream&)'
/opt/gnu/include/g++/iostream.h:224: warning: `class istream' has pointer data members
/opt/gnu/include/g++/iostream.h:224: warning: but does not override `istream(const istream&)'
/opt/gnu/include/g++/iostream.h:224: warning: or `operator=(const istream&)'
/opt/gnu/include/g++/iostream.h: In method `class _IO_istream_withassign & _IO_istream_withassign::operator =(class _IO_istream_withassign &)':
/opt/gnu/include/g++/iostream.h:237: warning: `operator=' should return a reference to `*this'
/opt/gnu/include/g++/iostream.h: In method `class _IO_ostream_withassign & _IO_ostream_withassign::operator =(class _IO_ostream_withassign &)':
/opt/gnu/include/g++/iostream.h:244: warning: `operator=' should return a reference to `*this'
/opt/gnu/include/g++/stl_iterator.h: At top level:
In file included from /opt/gnu/include/g++/stl_algobase.h:56,
from /opt/gnu/include/g++/vector:30,
from test.cc:1:
/opt/gnu/include/g++/stl_iterator.h:325: warning: postfix `back_insert_iterator<Container>::operator ++(int)' should return `back_insert_iterator<Container>'
/opt/gnu/include/g++/stl_iterator.h:325: warning: postfix `back_insert_iterator<Container>::operator ++(int)' should return `back_insert_iterator<Container>'
/opt/gnu/include/g++/stl_iterator.h:363: warning: postfix `front_insert_iterator<Container>::operator ++(int)' should return `front_insert_iterator<Container>'
/opt/gnu/include/g++/stl_iterator.h:363: warning: postfix `front_insert_iterator<Container>::operator ++(int)' should return `front_insert_iterator<Container>'
/opt/gnu/include/g++/stl_iterator.h:404: warning: postfix `insert_iterator<Container>::operator ++(int)' should return `insert_iterator<Container>'
/opt/gnu/include/g++/stl_iterator.h:404: warning: postfix `insert_iterator<Container>::operator ++(int)' should return `insert_iterator<Container>'
/opt/gnu/include/g++/stl_iterator.h:824: warning: postfix `ostream_iterator<T>::operator ++(int)' should return `ostream_iterator<T>'
/opt/gnu/include/g++/stl_iterator.h:824: warning: postfix `ostream_iterator<T>::operator ++(int)' should return `ostream_iterator<T>'
In file included from /opt/gnu/include/g++/vector:35,
from test.cc:1:
/opt/gnu/include/g++/stl_bvector.h:65: warning: `struct __bit_reference' has pointer data members
/opt/gnu/include/g++/stl_bvector.h:65: warning: but does not override `__bit_reference(const __bit_reference&)'
/opt/gnu/include/g++/stl_bvector.h: In method `struct __bit_reference & __bit_reference::operator =(const struct __bit_reference &)':
/opt/gnu/include/g++/stl_bvector.h:57: warning: `operator=' should return a reference to `*this'
/opt/gnu/include/g++/stl_bvector.h: At top level:
/opt/gnu/include/g++/stl_bvector.h:150: warning: `struct __bit_iterator' has pointer data members
/opt/gnu/include/g++/stl_bvector.h:150: warning: but does not override `__bit_iterator(const __bit_iterator&)'
/opt/gnu/include/g++/stl_bvector.h:150: warning: or `operator=(const __bit_iterator&)'
/opt/gnu/include/g++/stl_bvector.h:237: warning: `struct __bit_const_iterator' has pointer data members
/opt/gnu/include/g++/stl_bvector.h:237: warning: but does not override `__bit_const_iterator(const __bit_const_iterator&)'
/opt/gnu/include/g++/stl_bvector.h:237: warning: or `operator=(const __bit_const_iterator&)'
test.cc: In instantiation of `Vector<Node>':
test.cc:24: instantiated from here
test.cc:24: warning: base class `class vector<Node,__default_alloc_template<false,0> >' has a non-virtual destructor
/opt/gnu/include/g++/stl_vector.h: In method `Node::Node()':
/opt/gnu/include/g++/stl_vector.h:209: Internal compiler error 980521.
/opt/gnu/include/g++/stl_vector.h:209: Please submit a full bug report to `egcs-bugs@cygnus.com'.
test.ii.gz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.ii.gz
Type: application/x-gzip
Size: 17327 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/19981002/dbf28d28/attachment.bin>
More information about the Gcc-bugs
mailing list