Opened 14 years ago

Closed 14 years ago

Last modified 10 years ago

#2098 closed Bugs (fixed)

system fails to compile with -fno-exceptions

Reported by: brbarret@… Owned by: Beman Dawes
Milestone: Boost 1.36.0 Component: system
Version: Boost 1.35.0 Severity: Problem
Keywords: Cc:

Description (last modified by Beman Dawes)

The regex 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. There didn't seem to be a better option to make g++ happy than to just #ifndef out the catch(...) block, as it would otherwise complain about the throw in the block.

Attachments (1)

boost_system_no_exceptions.diff (422 bytes ) - added by anonymous 14 years ago.

Download all attachments as: .zip

Change History (3)

by anonymous, 14 years ago

comment:1 by Beman Dawes, 14 years ago

Description: modified (diff)
Resolution: fixed
Status: newclosed

comment:2 by joeriedel@…, 10 years ago

This no longer compiles on mac osx GCC 4 with BOOST_NO_EXCEPTIONS defined but without -fno-exceptions. BOOST_NO_EXCEPTIONS can be used to simply disable exception handling in boost no necessarily flag that exception handling is disabled at the compiler level:

http://www.boost.org/doc/libs/1_36_0/libs/utility/throw_exception.html

BOOST_NO_EXCEPTION can be used to supply a custom exception handler.

Wrapping the try block on line 136 on system/error_code.cpp fixes this.

Note: See TracTickets for help on using tickets.