This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


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

Re: b20: c++ bug or feature?


Andres Heinloo <lka@physic.ut.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@cygnus.com" with one line of text: "help".


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