This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc bug report


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]