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: Internal compiler error in `rest_of_compilation', at toplev.c :441 5


On Fri, 17 Dec 1999 gschmidt@BUNSEN-AND-BEAKER.MIT.EDU wrote:

> dllimport'd virtual function members aren't correctly handled
> currently -- the compiler chokes when it tries to generate the vtable.
> That's not a disaster, because unlike data, functions don't have to be
> declared dllimport for them to be correctly imported.
> 
> I posted a workaround patch for this to the list earlier, and some
> others with more gcc internals clue than myself are working on a
> cleaner and more efficient solution.

I'll have an "update" for gcc-2.95.2 that will fix quite a few of the
known bugs in importing and exporting C++ methods (and C functions).
The method actually is somewhat similar, at least in spirit, to the 
change Geoff had suggested in gcc mailing list.

The gotcha in my update will be the following:
 
 - C++ methods will still use the thunks. Not a big deal.
 - Still won't be able to erroneous code like the one this bug report
   was about (trying to *define* a dll imported method). Even MSVC
   warns about this, and this behaviour IMO can lead to buggy code
   that is hard to track down.
 - lots of extra vtables generated, which makes the executable larger 
   than say what MSVC will produce.

What we're trying to do for gcc-2.96 is more ambitious -- trying to 
match what MSVC does. However, as I keep on finding out, this requires
quite a few tricky changes to the C++ front-end to make certain bits
of information available earlier so that dllimport/export code use it. 
This is turning out to be not so easy. Fingers crossed. Thanks to Jason 
Merrill (C++ co-maintainer) for taking a look at this issue. C++ front-
end is hairy, privy to only a handful of folks out there and I certainly 
am not one of those. Not even by a long shot!

I do hope that users will hold on for a while and we will fix these over
time (contingent upon how much of our free time we're willing to devote
to it of course).

Regards,
Mumit




--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


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