lists.zerezo.com



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

***BOGO*** [Mingw-users] MinGW gcc 3.x, 4.x and exceptions



First, thanks Charles Wilson for your explanation of the development and 
  patching of MinGW (it seems even more effort than I thought), and of 
the SJLJ/DW2 exception issues.

For a long time I have been reluctant to use exceptions in my programs 
due to problems such as implementation bugs (many years ago), 
incompatibility between compiler versions, code size increase, etc. even 
if I think it is the way to handle errors.

More recently I was about to go ahead and write exception aware code, 
but then I read about problems throwing exceptions across DLL 
boundaries, the different models (SJLJ vs DW2), and the need of a shared 
libgcc.

I tested gcc 3.4.5 and found no problem: an exception thrown by a DLL 
(loaded on demand with LoadLibrary) was caught by the main exe. Not sure 
if problems are only in DLLs linked with import libs.

Now, in gcc 4.x, they say in order to throw exceptions across DLLs you 
must link a shared libgcc. IMHO this kind of breaks the MinGW philosophy 
of not depending on additional DLLs (see the home page), possibly the 
main difference with cygwin and one of the reasons I prefer MinGW.

I would say it is *very* important to keep MinGW this way and still 
support exceptions. If that implies using the "old" SJLJ system, I 
wouldn't mind. I can admit a little performance loss. If 3.x can do it, 
why can't 4.x?

(Charles already mentioned that some developers would get annoyed by 
this shared thing and I wanted to emphasize it with my opinion)


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
MinGW-users mailing list
MinGW-users@xxxxxxxxxxxxxxxxxxxxx

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users