This is the mail archive of the gcc-help@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: generic thunk code fails for method ...


Igor Alekseev <alekseev@bnl.gov> writes:

> could you help me in finding information about gcc error messages ?
> I have a code which was successfully compiled with gcc 2.96 under
> RedHat 7.0, but under RedHat 9.0 with gcc 3.2.3 it fails with the
> message:
> 
> ServerHandler.cc:96: generic thunk code fails for method `virtual int
>     ServerHandler::outputError(int, const char*, const char*, ...)'
> which uses
>     `...'
> 
> Could you explain for me what this message means and what shell I do
> with it ?

That is a nice error message, isn't it?

The error message means that gcc is trying to generate a thunk.  Most
targets have target-specific code to do this.  There is also generic
code for it.  The generic code can not handle varargs methods.  The
error message means that gcc needs to generate a thunk to call a
method, that the target you are using has no target-specific code to
handle that, and that the generic code doesn't work because the method
uses varargs.

g++ needs to generate a thunk in certain cases involving virtual
functions when using multiple inheritance or co-variant returns.

Unfortunately, you didn't mention what target you are using.  The i386
target has had target-specific thunk port for some time, certainly in
3.2.3.  So if you get this when compiling for the i386, something odd
is going on.

Note that the latest official release is 3.3.3.

Ian


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