Skip to content

Commit

Permalink
Adjust code for minimal supported GCC having being bumped to 4.9
Browse files Browse the repository at this point in the history
  • Loading branch information
K-ballo committed Jun 22, 2017
1 parent 52dd1e1 commit e299005
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 47 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Expand Up @@ -924,8 +924,8 @@ link_directories(${CMAKE_BINARY_DIR}/lib)

# Check if the selected compiler versions are supposed to work with our codebase
if(CMAKE_COMPILER_IS_GNUCXX AND HPX_WITH_GCC_VERSION_CHECK)
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
hpx_error("GCC 4.8 or higher is required. Specify HPX_GCC_VERSION_CHECK=OFF to ignore this error.")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9)
hpx_error("GCC 4.9 or higher is required. Specify HPX_GCC_VERSION_CHECK=OFF to ignore this error.")
endif()
endif()

Expand Down
6 changes: 0 additions & 6 deletions hpx/compute/host/target_distribution_policy.hpp
Expand Up @@ -179,15 +179,9 @@ namespace hpx { namespace compute { namespace host

for (std::size_t i = 0; i != v.size(); ++i)
{
#if !defined(HPX_GCC_VERSION) || HPX_GCC_VERSION >= 408000
result.emplace_back(
std::move(localities[i]), v[i].get()
);
#else
result.push_back(std::make_pair(
std::move(localities[i]), v[i].get()
));
#endif
}

return result;
Expand Down
4 changes: 1 addition & 3 deletions hpx/config.hpp
Expand Up @@ -555,10 +555,8 @@
"This function is deprecated and will be removed in the future."
# if defined(HPX_MSVC)
# define HPX_DEPRECATED(x) __declspec(deprecated(x))
# elif (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
# elif defined(__GNUC__)
# define HPX_DEPRECATED(x) __attribute__((__deprecated__(x)))
# elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
# define HPX_DEPRECATED(x) __attribute__((__deprecated__))
# endif
# if !defined(HPX_DEPRECATED)
# define HPX_DEPRECATED(x) /**/
Expand Down
14 changes: 1 addition & 13 deletions hpx/runtime/parcelset/parcelport.hpp
Expand Up @@ -37,10 +37,6 @@

#include <hpx/config/warnings_prefix.hpp>

#if defined(HPX_GCC_VERSION) && HPX_GCC_VERSION < 40900
#define HPX_PARCELSET_PENDING_PARCELS_WORKAROUND
#endif

///////////////////////////////////////////////////////////////////////////////
namespace hpx { namespace agas
{
Expand Down Expand Up @@ -342,18 +338,10 @@ namespace hpx { namespace parcelset
hpx::applier::applier *applier_;

/// The cache for pending parcels
#if defined(HPX_PARCELSET_PENDING_PARCELS_WORKAROUND)
typedef util::tuple<
std::shared_ptr<std::vector<parcel> >
, std::vector<write_handler_type>
>
#else
typedef util::tuple<
std::vector<parcel>
, std::vector<write_handler_type>
>
#endif
map_second_type;
> map_second_type;
typedef std::map<locality, map_second_type> pending_parcels_map;
pending_parcels_map pending_parcels_;

Expand Down
22 changes: 0 additions & 22 deletions hpx/runtime/threads/coroutines/detail/tss.hpp
Expand Up @@ -51,33 +51,11 @@ namespace hpx { namespace threads { namespace coroutines { namespace detail
value_(val)
{}

#if !(defined(HPX_INTEL_VERSION) && __GNUC__ == 4 && __GNUC_MINOR__ == 6)
tss_data_node(tss_data_node&& rhs)
: func_(std::move(rhs.func_)),
value_(rhs.value_)
{
rhs.func_.reset();
rhs.value_ = nullptr;
}
#endif

~tss_data_node()
{
cleanup();
}

#if !(defined(HPX_INTEL_VERSION) && __GNUC__ == 4 && __GNUC_MINOR__ == 6)
tss_data_node& operator=(tss_data_node&& rhs)
{
func_ = std::move(rhs.func_);
value_ = rhs.value_;

rhs.func_.reset();
rhs.value_ = nullptr;
return *this;
}
#endif

template <typename T>
T get_data() const
{
Expand Down
2 changes: 1 addition & 1 deletion src/util/backtrace/backtrace.cpp
Expand Up @@ -24,7 +24,7 @@
&& (!defined(__ANDROID__) || !defined(ANDROID))
#define BOOST_HAVE_EXECINFO
#define BOOST_HAVE_DLFCN
#if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) && !defined(__clang__)
#if defined(__GNUC__) && !defined(__clang__)
# define BOOST_HAVE_UNWIND
#endif
#endif
Expand Down

0 comments on commit e299005

Please sign in to comment.