Article View: gnu.g++.bug
Article #1139Re: g++ problems
From: Mike Stump
Date: Tue, 10 Nov 1992 20:53
Date: Tue, 10 Nov 1992 20:53
57 lines
2034 bytes
2034 bytes
These problems has been fixed, and should not exist in the release
after next release of gcc. (Note, they might be fixed in the current
release, I have not tried it.)
> Message-Id: <9207061731.AA15033@julia.math.ucla.edu>
> From: Kirby A. Baker <kab@math.ucla.edu>
> To: bug-g++@prep.ai.mit.edu
> Cc: bugs@math.ucla.edu
> Date: Mon, 06 Jul 92 10:31:29 -0700
> Here are a bug (g++ or gcc?) and a possible g++ bug, although you
> may already be aware of them. I am not sure of our g++ version
> number, but we acquired it from Qualix just recently and some
> documentation seems to be dated 12/27/91. The gcc version is said
> to be 2.1.
> A) The following produces the error comment
> "/Starter-C++/bin/gcc: Internal compiler error: program cc1plus got fatal signal 11"
> The program, in stripped but compilable form:
> template<class X> class vector{};
> template<class X> void print(vector<X>& v){}
> class scalar{};
> void print(scalar& s){}
> main(){
> scalar s;
> print(s);
> }
> B) The following seems to show an incompatibility of const functions
> with templates. It does not compile as is, but does compile and
> run if either the const 's are removed or template references are
> removed. (However, since I am a new C++ user, I may simply have
> misunderstood the spec's of C++.)
> #include "stream.h"
> template<class X> class base{
> public:
> void print() const;
> };
> template<class X> void base<X>::print() const{
> cout << "done\n";
> }
> main(){
> base<int> b;
> b.print();
> }
Technical Details
Message-ID:
<9211102053.AA25193@cygnus.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!saimiri.primate.wisc.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cygnus.com!mrsShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!saimiri.primate.wisc.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!cygnus.com!mrs From: mrs@cygnus.com (Mike Stump) Subject: Re: g++ problems Message-ID: <9211102053.AA25193@cygnus.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Tue, 10 Nov 1992 20:53:02 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 58