public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14454] New: virtual function with variable number of arguments won't compile
@ 2004-03-06  2:05 ktrummel at scene7 dot com
  2004-03-06  2:08 ` [Bug c++/14454] " ktrummel at scene7 dot com
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: ktrummel at scene7 dot com @ 2004-03-06  2:05 UTC (permalink / raw)
  To: gcc-bugs

This problem occurs on g++ version 3.3.2 on Solaris 8.  Here is the output from 
g++ -v:

Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-
ld=/usr/ccs/bin/ld --disable-nls
Thread model: posix
gcc version 3.3.2

The strange thing is that this does NOT occur with g++ 3.3.2 on Linux.  Here is 
the output from g++ -v for it:

Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/specs
Configured with: ../gcc-3.3.2/configure 
Thread model: posix
gcc version 3.3.2

Take the source appended to this message and simply compile (i.e. "g++ -c 
virtual.cpp") and the output is the following:

virtual.cpp:23: error: generic thunk code fails for method `virtual void 
   Foo::log(int, const char*, ...)' which uses `...'


And here is the source:

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

class BaseClass
{
public:
    BaseClass() {}
    virtual ~BaseClass() {}
    virtual void log(int level, const char *format, ...);
};

class Foo : public virtual BaseClass
{
public:
    Foo() {}
    virtual ~Foo() {}
    virtual void log(int level, const char *format, ...);
private:
};

void Foo::log(int level, const char *format, ...)
{
}

-- 
           Summary: virtual function with variable number of arguments won't
                    compile
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ktrummel at scene7 dot com
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14454


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2004-10-14  7:03 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-06  2:05 [Bug c++/14454] New: virtual function with variable number of arguments won't compile ktrummel at scene7 dot com
2004-03-06  2:08 ` [Bug c++/14454] " ktrummel at scene7 dot com
2004-03-06  3:41 ` [Bug target/14454] virtual function with vararg " pinskia at gcc dot gnu dot org
2004-03-06  5:09 ` bangerth at dealii dot org
2004-04-07 13:55 ` [Bug target/14454] [3.3/3.4/3.5 Regression] " pinskia at gcc dot gnu dot org
2004-06-18 23:57 ` mmitchel at gcc dot gnu dot org
2004-08-12  7:39 ` pinskia at gcc dot gnu dot org
2004-08-29 18:43 ` mmitchel at gcc dot gnu dot org
2004-10-01 16:06 ` [Bug target/14454] [3.3/3.4/4.0 " ebotcazou at gcc dot gnu dot org
2004-10-07  9:43 ` ebotcazou at gcc dot gnu dot org
2004-10-08 22:03 ` ebotcazou at gcc dot gnu dot org
2004-10-09  9:04 ` nathan at gcc dot gnu dot org
2004-10-10  8:39 ` ebotcazou at gcc dot gnu dot org
2004-10-10 16:30 ` nathan at gcc dot gnu dot org
2004-10-10 18:13 ` pinskia at gcc dot gnu dot org
2004-10-13 14:04 ` cvs-commit at gcc dot gnu dot org
2004-10-13 14:17 ` cvs-commit at gcc dot gnu dot org
2004-10-13 14:28 ` ebotcazou at gcc dot gnu dot org
2004-10-13 14:36 ` giovannibajo at libero dot it
2004-10-13 14:42 ` [Bug target/14454] [3.3 " pinskia at gcc dot gnu dot org
2004-10-13 14:45 ` pinskia at gcc dot gnu dot org
2004-10-14  6:44 ` ebotcazou at gcc dot gnu dot org
2004-10-14  6:55 ` cvs-commit at gcc dot gnu dot org
2004-10-14  7:03 ` ebotcazou at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).