Boost C++ Libraries: Ticket #2094: iostreams fails to compile with -fno-exceptions https://svn.boost.org/trac10/ticket/2094 <p> 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. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/2094 Trac 1.4.3 anonymous Thu, 10 Jul 2008 04:11:31 GMT attachment set https://svn.boost.org/trac10/ticket/2094 https://svn.boost.org/trac10/ticket/2094 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_iostreams_no_exceptions.diff</span> </li> </ul> Ticket Richard Smith <richard@…> Wed, 11 Nov 2009 23:27:18 GMT attachment set https://svn.boost.org/trac10/ticket/2094 https://svn.boost.org/trac10/ticket/2094 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_iostreams_no_throw.diff</span> </li> </ul> <p> Updated patch </p> Ticket Richard Smith <richard@…> Wed, 11 Nov 2009 23:31:45 GMT <link>https://svn.boost.org/trac10/ticket/2094#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2094#comment:1</guid> <description> <p> 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());. </p> <p> 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. </p> <p> This patch needs applying after the patch on &lt;<a class="ext-link" href="https://svn.boost.org/trac/boost/ticket/3612"><span class="icon">​</span>https://svn.boost.org/trac/boost/ticket/3612</a>&gt;. </p> </description> <category>Ticket</category> </item> <item> <author>Richard Smith <richard@…></author> <pubDate>Thu, 12 Nov 2009 00:03:42 GMT</pubDate> <title>attachment set https://svn.boost.org/trac10/ticket/2094 https://svn.boost.org/trac10/ticket/2094 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">boost_iostreams_no_throw.patch</span> </li> </ul> Ticket Daniel James Thu, 12 Nov 2009 19:18:25 GMT <link>https://svn.boost.org/trac10/ticket/2094#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/2094#comment:2</guid> <description> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/57604" title="Use boost::throw_exception. Refs #2094. Still some throws left when ...">[57604]</a>) Use boost::throw_exception. Refs <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2094" title="#2094: Bugs: iostreams fails to compile with -fno-exceptions (closed: fixed)">#2094</a>. </p> <p> Still some throws left when rethrowing caught exceptions. </p> <p> Thanks to Richard Smith. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Daniel James</dc:creator> <pubDate>Sat, 02 Jan 2010 11:51:43 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/2094#comment:3 https://svn.boost.org/trac10/ticket/2094#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> (In <a class="changeset" href="https://svn.boost.org/trac10/changeset/58633" title="Merge iostream fixes, mostly by Richard Smith. Fixes #3612, #3311, ...">[58633]</a>) Merge iostream fixes, mostly by Richard Smith. </p> <p> Fixes <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3612" title="#3612: Bugs: Throwing heap-allocated exceptions (closed: fixed)">#3612</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3311" title="#3311: Bugs: Unintentionally unthrown exceptions (closed: fixed)">#3311</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2094" title="#2094: Bugs: iostreams fails to compile with -fno-exceptions (closed: fixed)">#2094</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3010" title="#3010: Bugs: Missing include guard in boost/iostreams/device/mapped_file.hpp (closed: fixed)">#3010</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/2894" title="#2894: Bugs: Incorrect type for buffer_size and pback_size parameters (closed: fixed)">#2894</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3011" title="#3011: Bugs: code_converter doesn't support boost::ref( std::istream ) (closed: fixed)">#3011</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3352" title="#3352: Patches: CRC not correctly computed on x64 during decompression of gzip archive (closed: fixed)">#3352</a>, <a class="closed ticket" href="https://svn.boost.org/trac10/ticket/3505" title="#3505: Bugs: mapped_file windows handle validity check patch against 1.40.0 (closed: fixed)">#3505</a>. </p> Ticket