Article View: gnu.g++.bug
Article #1282g++ 2.3.2 bug
From: Steve Rumsby
Date: Wed, 16 Dec 1992 15:39
Date: Wed, 16 Dec 1992 15:39
45 lines
1607 bytes
1607 bytes
Script started on Wed Dec 16 15:32:21 1992
$ g++ -v
Reading specs from /gnu/lib/gcc-lib/sparc-sunos4/2.3.2/specs
gcc version 2.3.2
$ cat template.c
template<class T>
struct Matrix
{
Matrix() {}
~Matrix() {}
};
template <class T>
struct Vector: public Matrix<T>
{
Vector(int);
};
// This is fine by cfront 3.0.1, but not by gcc 2.3.2.
// Make this inline in the class definition and it compiles OK.
// Take out the parameter and it is fine also.
template <class T>
Vector<T>::Vector(int) : Matrix<T>()
{
}
main(int argc,char *argv[])
{
Vector<int> vertex(3);
return 0;
}
$ g++ -c template.c
template.c: In function `int main (int, char **)':
template.c:12: inconsistent return types for method `Vector' in class `Vector<int>'
template.c: In method `Vector<int>::~Vector ()':
template.c:18: only constructors take base initializers
template.c:20: Internal compiler error.
template.c:20: Please report this to `bug-g++@prep.ai.mit.edu'.
$
script done on Wed Dec 16 15:32:58 1992
--
UUCP: ...!uknet!warwick!steve Internet: steve@maths.warwick.ac.uk
JANET: steve@uk.ac.warwick.maths PHONE: +44 203 524657
Technical Details
Message-ID:
<4783.199212161539@amazon.maths.warwick.ac.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!maths.warwick.ac.UK!steveShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!maths.warwick.ac.UK!steve From: steve@maths.warwick.ac.UK (Steve Rumsby) Subject: g++ 2.3.2 bug Message-ID: <4783.199212161539@amazon.maths.warwick.ac.uk> Sender: gnulists@ai.mit.edu Organization: Maths Institute, Warwick University, Coventry, UK. Distribution: gnu Date: Wed, 16 Dec 1992 15:39:27 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 46