gcc bug report
Zack Weinberg
zack@codesourcery.com
Wed Jan 7 18:51:00 GMT 2004
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
More information about the Gcc-bugs
mailing list