This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: gcc bug report
- From: "Zack Weinberg" <zack at codesourcery dot com>
- To: Petar Maymounkov <petar at scs dot cs dot nyu dot edu>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 07 Jan 2004 10:51:39 -0800
- Subject: Re: gcc bug report
- References: <Pine.BSO.4.58.0401071213080.8364@ludlow.scs.cs.nyu.edu>
Petar Maymounkov <petar@scs.cs.nyu.edu> writes:
> (a) gcc -v:
> Using builtin specs.
> gcc version 2.95.4 20020320 [FreeBSD]
>
> (b) uname -a:
> FreeBSD williamsburg-bridge.scs.cs.nyu.edu 4.7-RELEASE FreeBSD 4.7-RELEASE
> #0: Wed Oct 9 15:08:34 GMT 2002
> root@builder.freebsdmall.com:/usr/obj/usr/src/sys/GENERIC i386
>
> (c) command line that triggers bug:
> gcc proxy.C
>
> (d) compiler output:
> (NONE)
>
> (e) proxy.C and proxy.ii are attached.
You don't say what the bug is. I am guessing that it's that the
no-argument A constructor gets called instead of A(int) when the
program is run. This is the behavior specified by the standard.
The key sentence is in paragraph 6 of [class.base.init]:
A _mem-initializer_ naming a virtual base class shall be ignored
during execution of the constructor of any class that is not the
most derived class.
zw