Subject: [Boost-bugs] [Boost C++ Libraries] #3335: boost::threads does not compile with gcc -fno-exceptions
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-08-11 14:23:36
#3335: boost::threads does not compile with gcc -fno-exceptions
---------------------------------------------------+------------------------
Reporter: Andrew Chittenden <andyc@â¦> | Owner:
Type: Bugs | Status: new
Milestone: Boost 1.40.0 | Component: None
Version: Boost 1.39.0 | Severity: Problem
Keywords: |
---------------------------------------------------+------------------------
The following program fails to compile:
--snip
#define BOOST_NO_EXCEPTIONS
#include <boost/thread/mutex.hpp>
int foo;
int
fn(boost::mutex& pMutex) {
boost::mutex::scoped_lock lock(pMutex);
return foo;
}
--snip
It fails:
# g++ -fno-exceptions -I/home/andyc/work/3rdParty/boost_1_39_0 -c -o
test.o test.cpp
In file included from
/home/andyc/work/3rdParty/boost_1_39_0/boost/thread/mutex.hpp:16,
from test.cpp:3:
/home/andyc/work/3rdParty/boost_1_39_0/boost/thread/pthread/mutex.hpp: In
constructor ?boost::mutex::mutex()?:
/home/andyc/work/3rdParty/boost_1_39_0/boost/thread/pthread/mutex.hpp:40:
error: exception handling disabled, use -fexceptions to enable
There are other exceptions in boost/thread/locks.hpp that aren't
surrounded by #ifndef BOOST_NO_EXCEPTIONS too. I've attached a patch to
fix those.
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/3335> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:01 UTC