Modify

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#2094 closed Bugs (fixed)

iostreams fails to compile with -fno-exceptions

Reported by: brbarret@… Owned by: Jonathan Turkanis
Milestone: Boost 1.36.0 Component: iostreams
Version: Boost 1.35.0 Severity: Problem
Keywords: Cc:

Description

The iostreams component fails to compile with GCC when -fno-exceptions is specified. The attached patch allows the libraries / tests shipped with boost 1.35.0 to compile.

Attachments (3)

boost_iostreams_no_exceptions.diff (6.9 KB) - added by anonymous 9 years ago.
boost_iostreams_no_throw.diff (33.8 KB) - added by Richard Smith <richard@…> 8 years ago.
Updated patch
boost_iostreams_no_throw.patch (33.7 KB) - added by Richard Smith <richard@…> 8 years ago.

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by anonymous

Changed 8 years ago by Richard Smith <richard@…>

Updated patch

comment:1 Changed 8 years ago by Richard Smith <richard@…>

I'm not actually sure how important -fno-exception support is these days. However, assuming this is still desirable (and in any case, it imposes very little overhead compared to the overhead of throwing an exception) the boost_iostreams_no_throw.diff patch replaces all instances of throw foo(); with boost::throw_exception(foo());.

This is *not* sufficient for a clean -fno-exception compile with modern gcc -- we would also need to remove all throw; statements (for rethrowing) and try/catch blocks, although there are very few of them. This patch does not do anything with them.

This patch needs applying after the patch on <https://svn.boost.org/trac/boost/ticket/3612>.

Changed 8 years ago by Richard Smith <richard@…>

comment:2 Changed 8 years ago by Daniel James

(In [57604]) Use boost::throw_exception. Refs #2094.

Still some throws left when rethrowing caught exceptions.

Thanks to Richard Smith.

comment:3 Changed 8 years ago by Daniel James

Resolution: fixed
Status: newclosed

(In [58633]) Merge iostream fixes, mostly by Richard Smith.

Fixes #3612, #3311, #2094, #3010, #2894, #3011, #3352, #3505.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Jonathan Turkanis.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.