delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/11/19/04:54:40

From: khan AT xraylith DOT wisc DOT edu (Mumit Khan)
Subject: Re: b20: c++ bug or feature?
19 Nov 1998 04:54:40 -0800 :
Message-ID: <9811181953.AA28805.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <Pine DOT GSO DOT 3 DOT 95q DOT 981117215740 DOT 2470A-100000 AT rubiin DOT physic DOT ut DOT ee>
To: Andres Heinloo <lka AT physic DOT ut DOT ee>
Cc: gnu-win32 AT cygnus DOT com, egcs AT cygnus DOT com

Andres Heinloo <lka AT physic DOT ut DOT ee> writes:
> 
> when compiling gtk-- example program 'OhharaDraw', I get the following
> error:
> 
> OhharaDraw.h:130: sorry, not implemented: object size exceeds normal limit
> for virtual function table implementation, recompile all source and use
> -fhuge-objects

[ I'm copying egcs as well. Hopefully egcs C++ folks will provide some
  insight into this ]

The hierarchy looks like this:
  
  Gtk_Signal_Base <-V- Gtk_Base      <--- Gtk_Object <--- Gtk_Widget 
                  <--- Gtk_Container <--- Gtk_Bin    <--- Gtk_Window 
                  <--- OhharaDraw 

Where I've marked the virtual inheritence with '<-V-'.

When building the vtable for ``OhharaDraw'', the compiler is running
into the limitation that the offset is represented by a signed short,
and cannot hold -45054 (the resulting offset for type info function
in this case).

Any target platform that does not use vtable "thunks" is affected by this. 
For example, HPUX is as affected by it as ix86-win32. ix86-linux uses
vtable thunks by default, so it works there.

Solutions? 

(1) Recompile *everything* with -fvtable-thunks. I don't know if it works
    for x86-win32 targets. 
(2) Recompile *everything* with -fhuge-objects. Hardly an option for real
    life code. Also, I don't know how well debugged -fhuge-objects really
    is, so you might be running into other compiler/library bugs there.
(2) Since there is no multiple inheritance in this particular case (I
    don't know anything about Gtk's design, so may be way off here), make
    Gtk_Signal_Base just a public base class instead of public virtual
    base class.

Regards,
Mumit

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019