#2094 closed Bugs (fixed)
iostreams fails to compile with -fno-exceptions
Reported by: | 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)
Change History (6)
by , 14 years ago
Attachment: | boost_iostreams_no_exceptions.diff added |
---|
by , 13 years ago
Attachment: | boost_iostreams_no_throw.diff added |
---|
comment:1 by , 13 years ago
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>.
by , 13 years ago
Attachment: | boost_iostreams_no_throw.patch added |
---|
Updated patch