First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 7306
Product:  
Component:  
Status: RESOLVED
Resolution: FIXED
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: 151357@bugs.debian.org
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 7306 depends on: Show dependency tree
Show dependency graph
Bug 7306 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2002-07-14 04:56
[ Reported to the Debian BTS as report #151357.
  Please CC 151357@bugs.debian.org on replies.
  Log of report can be found at http://bugs.debian.org/151357 ]
	

Stephane Magnenat <nct@ysagoon.com> reports:

When I try to compile C++ code with virtual inheritance and variable number of 
argument method, the compilation fails with the following message :

bugreport.cpp:35: generic thunk code fails for method `virtual void
   Virt::p(const char*, ...)' which uses `...'

It is working fine with gcc 2.95.x



#include <stdio.h>
#include <stdarg.h>

class Base
{
public:
	Base() { }
	virtual void p(const char *format, ...)=0;
};

class Der1: public virtual Base
{
public:
	Der1():Base() { }
	virtual void p(const char *format, ...)=0;
};

class Der2: public virtual Base
{
public:
	Der2():Base() { }
	virtual void p(const char *format, ...)=0;
};

class Virt:public virtual Der1, public virtual Der2
{
public:
	Virt():Der1(),Der2() { }
	virtual void p(const char *format, ...)
	{
		va_list arglist;
		va_start(arglist,format);
		vprintf(format, arglist);
		va_end(arglist);
	}
};

int main(int argc, char *argv[])
{
	Virt v;
	v.p("Hello %d\n", 10);
}

Release:
3.1 (Debian) (Debian unstable)

Environment:
System: Debian GNU/Linux (unstable)
Architecture: i686
	
host: i386-linux
configured with: /mnt/data/gcc-3.1/gcc-3.1-3.1ds2/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=$\(prefix\)/share/man --infodir=$\(prefix\)/share/info --with-gxx-include-dir=$\(prefix\)/include/g++-v3-3.1 --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --enable-clocale=gnu --enable-threads=posix --enable-java-gc=boehm --enable-objc-gc i386-linux

------- Comment #1 From Kriang Lerdsuwanakij 2002-07-14 08:23 -------
State-Changed-From-To: open->analyzed
State-Changed-Why: Confirmed.  A regression from GCC 2.95.

------- Comment #2 From Nathan Sidwell 2002-07-14 10:59 -------
Responsible-Changed-From-To: unassigned->nathan
Responsible-Changed-Why: working on a patch (implementing ASM_OUTPUT_VMI_THUNK)

------- Comment #3 From Nathan Sidwell 2002-07-16 01:32 -------
Responsible-Changed-From-To: nathan->unassigned
Responsible-Changed-Why: not working on it (preliminary patch & resons
    for not doing it at http://gcc.gnu.org/ml/gcc-patches/2002-07/msg00650.html)

------- Comment #4 From Nathan Sidwell 2002-07-16 01:32 -------
State-Changed-From-To: analyzed->suspended
State-Changed-Why: Waiting on multiple entry point handling

------- Comment #5 From Andreas Jaeger 2002-10-22 11:36 -------
State-Changed-From-To: suspended->closed
State-Changed-Why: This bug has been fixed in CVS for GCC 3.3 with this patch
    referenced here:
    http://gcc.gnu.org/ml/gcc-patches/2002-10/msg01136.html
    
    and a number of follow-on patches.  So, this will be fixed
    in GCC 3.3,
    
    Andreas

First Last Prev Next    No search results available      Search page      Enter new bug