This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: egcs-1.1.2 create abstract class
- To: Carlo Wood <carlo at runaway dot xs4all dot nl>
- Subject: Re: egcs-1.1.2 create abstract class
- From: Nathan Sidwell <nathan at acm dot org>
- Date: Mon, 04 Oct 1999 17:46:14 +0100
- CC: egcs-bugs at egcs dot cygnus dot com, raoulgough at my-deja dot com
- References: <199910010149.DAA13239@jolan.ppro>
- Reply-To: nathan at compsci dot bristol dot ac dot uk
Carlo Wood wrote:
>
> Hiya, I got this one from a news group
>
> From: raoulgough@my-deja.com
> Newsgroups: comp.lang.c++.moderated
> Subject: Compiler automatically generates abstract object (crash)
> Date: 29 Sep 1999 02:44:17 -0400
>
> ~/c++/tests>g++ abstract.cc
> ~/c++/tests>a.out
> virtfn from object at 0xbffff4b4
> pure virtual method called
>
> Reason being that g++ happily constructed an abstract object,
> with a pure virtual function. I am not 100% sure this is bug
> but I thought I'd let you know.
The gcc 2.95 moans really loadly,
fart.cc: In function `int main (...)':
fart.cc:32: cannot allocate an object of type `const Abstract'
fart.cc:32: since the following virtual functions are abstract:
fart.cc:7: void Abstract::virtfn () const
fart.cc:24: in passing argument 1 of `call_virtfn (const Abstract &)'
nathan
--
Dr Nathan Sidwell :: Computer Science Department :: Bristol University
I have seen the death of PhotoShop -- it is called GIMP
nathan@acm.org http://www.cs.bris.ac.uk/~nathan/ nathan@cs.bris.ac.uk