Skip to content

Commit

Permalink
#2264: work around gcc-8 limitations
Browse files Browse the repository at this point in the history
  • Loading branch information
cz4rs authored and cwschilly committed Sep 20, 2024
1 parent 97b0ad1 commit 53571e5
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 57 deletions.
2 changes: 1 addition & 1 deletion src/vt/context/runnable_context/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ struct Trace {
struct Trace {

template <typename... Args>
Trace([[maybe_unused]] Args&&... args) {}
Trace(Args&&...) {}

};

Expand Down
7 changes: 5 additions & 2 deletions src/vt/runnable/runnable.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#define INCLUDED_VT_RUNNABLE_RUNNABLE_H

#include "vt/messaging/message/smart_ptr.h"
#include "vt/configs/debug/debug_var_unused.h"
#include "vt/context/runnable_context/td.h"
#include "vt/context/runnable_context/trace.h"
#include "vt/context/runnable_context/set_context.h"
Expand Down Expand Up @@ -120,11 +121,13 @@ struct RunnableNew {
*
* \param[in] in_is_threaded whether the handler can be run with a thread
*/
explicit RunnableNew([[maybe_unused]] bool in_is_threaded)
explicit RunnableNew(bool in_is_threaded)
#if vt_check_enabled(fcontext)
: is_threaded_(in_is_threaded)
#endif
{ }
{
vt_force_use(in_is_threaded); // FIXME gcc-8 errors out on [[maybe_unused]]
}

RunnableNew(RunnableNew&&) = default;
RunnableNew(RunnableNew const&) = delete;
Expand Down
49 changes: 0 additions & 49 deletions src/vt/vrt/context/context_vrt.cc

This file was deleted.

3 changes: 1 addition & 2 deletions src/vt/vrt/context/context_vrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ namespace vt { namespace vrt {

struct VirtualContext : VrtBase {
VirtualContext() = default;
VirtualContext([[maybe_unused]] bool const in_is_main) { }

friend struct VirtualContextAttorney;

Expand All @@ -64,7 +63,7 @@ struct VirtualContext : VrtBase {
};

struct MainVirtualContext : VirtualContext {
MainVirtualContext() : VirtualContext(true) { }
MainVirtualContext() : VirtualContext() { }
};

}} // end namespace vt::vrt
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/memory/test_memory_lifetime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ struct SerialTrackMsg : ::vt::Message {
vt_msg_serialize_required();

SerialTrackMsg() { ++alloc_count; }
SerialTrackMsg([[maybe_unused]] SerialTrackMsg const& other) {
SerialTrackMsg(SerialTrackMsg const&) {
++alloc_count;
}
SerialTrackMsg([[maybe_unused]] SerialTrackMsg&& other) { ++alloc_count; }
SerialTrackMsg(SerialTrackMsg&&) { ++alloc_count; }

template <typename Serializer>
void serialize(Serializer& s) {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/termination/test_term_dep_send_chain.cc
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ struct PrintParam {

struct MergeCol : vt::Collection<MergeCol,vt::Index2D> {
MergeCol() = default;
MergeCol([[maybe_unused]] NodeType num, double off) : offset_( off ) {
MergeCol(NodeType, double off) : offset_( off ) {
idx_ = getIndex();
}

Expand Down

0 comments on commit 53571e5

Please sign in to comment.