1 msgWide Streams
4 msgMINGW I/O support for file sizes > 2GB (LFS ...
2 msg#define WINVER 0x0400
11 msgWhy does g++ not link with libstdc++?
3 msghow to compile and link a library
1 msgHey Guys
5 msgCompile error using mingw
2 msg'include/c++/ext' missing fromgcc-part-c++-4.3....
1 msgFMTID_SummaryInformation andFMTID_UserDefinedPr...
2 msghow to realize mouse programming
3 msglooking for tiny light cross platform filesyste...
2 msgMinGW GCC Development Plan
3 msghow to use the read/write

GCC 4.3.0 20080502 (alpha) Released - Please he...
\ Aaron W. LaFramboise (5 May 2008)
. \ Chris Sutcliffe (5 May 2008)
. . \ Aaron W. LaFramboise (5 May 2008)
. . \ Earnie Boyd (5 May 2008)
. \ Doug Schaefer (5 May 2008)
. . \ Aaron W. LaFramboise (5 May 2008)
. . \ John Marriott (11 May 2008)
. . . \ Earnie Boyd (11 May 2008)
. . . . \ John Marriott (11 May 2008)
. . . . . \ Earnie Boyd (11 May 2008)
. . . . . . \ NightStrike (11 May 2008)
. \ John Brown (5 May 2008)
. . \ Aaron W. LaFramboise (5 May 2008)
. \ JonY (6 May 2008)
. . \ Bob Rossi (6 May 2008)
. . . \ Greg Chicares (6 May 2008)
. . . \ Aaron W. LaFramboise (6 May 2008)
. . . . \ Bob Rossi (6 May 2008)
. . . . . \ Tonal (6 May 2008)
. . . . . . \ Bob Rossi (6 May 2008)
. . . . . . . \ Mathias Fröhlich (6 May 2008)
. . . . . . . . \ Bob Rossi (6 May 2008)
. . . . . . . \ Earnie Boyd (6 May 2008)
. . . . . . . . \ Aaron W. LaFramboise (6 May 2008)
. . . . . . . . . \ Earnie Boyd (6 May 2008)
. . . . . . . . . \ Danny Smith (7 May 2008)
. . . . . . . . . . \ NightStrike (7 May 2008)
. . . . . . . . . . . \ Danny Smith (7 May 2008)
. . . . . . . . . . . . \ NightStrike (7 May 2008)
. . . . . . . . . . . \ Kai Tietz (7 May 2008)
. . . . . . . . . . \ Earnie Boyd (7 May 2008)
. . . . . \ Aaron W. LaFramboise (6 May 2008)
. . . \ Tonal (6 May 2008)
. . . . \ Bob Rossi (6 May 2008)
. . . . \ Aaron W. LaFramboise (6 May 2008)
. . . . . \ Tonal (8 May 2008)
. . . . . . \ Tonal (8 May 2008)
. . . . . . \ Earnie Boyd (8 May 2008)
. . . . . . . \ Tonal (8 May 2008)
. . . . . . . . \ Aaron W. LaFramboise (8 May 2008)
. . . . . . . . \ Earnie Boyd (8 May 2008)
. . . . \ Tonal (6 May 2008)
. \ Brian Dessent (6 May 2008)
. \ Brian Dessent (6 May 2008)
. . \ Aaron W. LaFramboise (6 May 2008)
. . . \ Tonal (6 May 2008)
. . . . \ Aaron W. LaFramboise (6 May 2008)
. \ Brian Dessent (6 May 2008)
. . \ Aaron W. LaFramboise (6 May 2008)
. . \ Greg Chicares (6 May 2008)
. \ StéphaneLarouche (7 May 2008)
. . \ Aaron W. LaFramboise (8 May 2008)
. \ ATS (7 May 2008)
. . \ Aaron W. LaFramboise (8 May 2008)
. . . \ Tonal (8 May 2008)
. \ Ramiro Polla (8 May 2008)
. . \ Aaron W. LaFramboise (8 May 2008)
. \ ATS (8 May 2008)
. . \ Charles Wilson (8 May 2008)
. . . \ Tonal (8 May 2008)
. . . . \ Aaron W. LaFramboise (8 May 2008)
. \ Sisyphus (8 May 2008)
. . \ Aaron W. LaFramboise (8 May 2008)
. \ Danny Smith (8 May 2008)
. . \ Aaron W. LaFramboise (8 May 2008)
. \ StéphaneLarouche (10 May 2008)
. . \ Aaron W. LaFramboise (10 May 2008)
. \ Brian Dessent (10 May 2008)
. \ StéphaneLarouche (10 May 2008)
. \ Tonal (11 May 2008)
. . \ Tonal (11 May 2008)
. . . \ JonY (11 May 2008)
. . . . \ Tonal (11 May 2008)
. . \ Tonal (11 May 2008)

10 msgMinGW gcc 3.x, 4.x and exceptions
4 msgdllwrap 2.17.50 20060824
12 msgstrtod is not C99-compatible
4 msgTest program crashes with g++ 4.2.1-dw2 usingli...
25 msgimlib2
3 msgDisassembly of stack frame
Subject:Re: GCC 4.3.0 20080502 (alpha) Released -Please helpus test it!
Group:Mingw-users
From:Brian Dessent
Date:6 May 2008


 
"Aaron W. LaFramboise" wrote:

> Can you clarify this case? The STL generally does not throw exceptions
> unless the programmer asks it to. The only unexpected exception
> situation I can think of is std::bad_alloc.

The STL is littered with exceptions. Consider a std::string object s:

std::out_of_range is thrown for:

s.append(str, pos, n) or
s.assign(str, pos, n) or
s.at(pos) or
s.copy(s, n, pos) or
s.erase(pos, n) or
s.insert(pos, n, c) or
s.replace(pos, n1, n2, c)
s.substr(pos, n) for pos out of bounds

std::length_error is thrown for:

s.insert() or
s.replace() or
s.reserve() if new length > max_size()

Not every programmer wraps every conceivable std::string operation with
a try/catch, so it's not unheard of for unexpected exceptions to bubble
up when there are bugs or under-validated inputs.

> A user can override abort() if he likes.

Sure, but you can't really do anything useful as you don't have any
context.

> Or, he can catch exceptions in
> the callback and propagate it properly.

You can modify the code to install a try block in the WndProc, but it's
not a common idiom in existing code because it's not necessary with MSVC
nor SJLJ gcc. It's purely an ugly workaround for a compiler limitation,
and a regression.

> > Any codepath that goes through code that wasn't
> > compiled with a DW2-enabled compiler is a potential source of failure --
>
> This is also true of any other exception strategy, including both SEH
> and SJLJ. It is not valid to throw through functions that don't know
> about exceptions unless they are specially written to accommodate this.
> The primary problems are that it may leave dynamic data structures in
> an incoherent state or it may leak resources.

The problem is that the DW2 failure is brittle, whereas the SEH and SJLJ
unwinders do find the matching catch block regardless of the frames in
between. Whether or not it's valid I don't know, but the point is that
users on the Win32 platform have come to expect a certain behavior based
on the native tools and the GNU tools up until now, and this is a
departure.

> -Delay release: No reason to delay release for everyone when only a
> minority user subset is affected. We need to get this thing moving.
>
> -Two separate compilers: Releasing two compilers with two incompatible
> ABIs will probably cause serious problems for our C++ users, hitting
> again once SJLJ is dropped, which would be fairly soon anyway.
>
> -Only SJLJ: The poor performance of SJLJ makes Java impractically slow,
> and even in C++ causes problems for some code. The ABI would be broken,
> again, during the upgrade, which, as I mentioned, will happen fairly
> soon. There probably is only marginal value in releasing such a compiler.

I agree that gcc on Win32 is in a really agonizing situation here. And
I realize that going forward DW2 is certainly where things need to be
moving for the default. It's just that I think by pronouncing SJLJ as
completely out of the question you doom a certain segment of the
population into forever being stuck on g++ 3.4 and never being able to
appreciate any of the improvements in the 4.x series, unless they can
stomache the thought of building their own toolchain with
--enable-sjlj-exceptions. (Or using Danny's 4.2 sjlj builds I suppose.)

On the other hand, doing nothing is arguably worse; something is better
than nothing. If progress can only be made by ignoring SJLJ then so be
it. 3.4 will always be there.

Brian

-------------------------------------------------------------------------
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

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


© 2004-2008 readlist.com