Opened 10 years ago

Last modified 10 years ago

#7149 reopened Bugs

system failed to compile with BOOST_NO_EXCEPTIONS defined when -fno-exceptions is NOT used

Reported by: joeriedel@… Owned by: Beman Dawes
Milestone: To Be Determined Component: system
Version: Boost 1.51.0 Severity: Problem
Keywords: Cc: viboes

Description

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 not necessarily to 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 with #ifndef BOOST_NO_EXCEPTIONS fixes this.

See ticket #2098

Attachments (2)

7149.patch (980 bytes ) - added by viboes 10 years ago.
This pacth works for me.
7149_2.patch (382 bytes ) - added by viboes 10 years ago.
Sorry, I forget the implementation part ;-)

Download all attachments as: .zip

Change History (6)

comment:1 by viboes, 10 years ago

Component: Nonesystem
Owner: set to Beman Dawes

by viboes, 10 years ago

Attachment: 7149.patch added

This pacth works for me.

comment:2 by viboes, 10 years ago

Cc: viboes added

Could I commit this patch?

by viboes, 10 years ago

Attachment: 7149_2.patch added

Sorry, I forget the implementation part ;-)

comment:3 by viboes, 10 years ago

Resolution: duplicate
Status: newclosed

See duplicates:

#7394 system_error.hpp fails with BOOST_NO_EXCEPTIONS (-fno-exceptions)

#7500 system_error.hpp doesn't compile without exceptions

Last edited 10 years ago by viboes (previous) (diff)

comment:4 by viboes, 10 years ago

Resolution: duplicate
Status: closedreopened
Note: See TracTickets for help on using tickets.