Skip to content

Commit 82a019b

Browse files
authored
C++20 related fixes (#13860)
1 parent 75dbb6f commit 82a019b

File tree

8 files changed

+4
-33
lines changed

8 files changed

+4
-33
lines changed

Framework/Core/src/ArrowSupport.cxx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646
#include <boost/program_options/variables_map.hpp>
4747
#include <csignal>
4848

49-
#pragma GCC diagnostic push
50-
#pragma GCC diagnostic ignored "-Wpedantic"
5149
namespace o2::framework
5250
{
5351

@@ -596,4 +594,3 @@ o2::framework::ServiceSpec ArrowSupport::arrowTableSlicingCacheSpec()
596594
}
597595

598596
} // namespace o2::framework
599-
#pragma GGC diagnostic pop

Framework/Core/src/CallbacksPolicy.cxx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@
2020
#include <cstdlib>
2121
#include <uv.h>
2222

23-
// This is to allow C++20 aggregate initialisation
24-
#pragma GCC diagnostic push
25-
#pragma GCC diagnostic ignored "-Wpedantic"
26-
2723
namespace o2::framework
2824
{
2925

Framework/Core/src/CommonMessageBackends.cxx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
#include <boost/program_options/variables_map.hpp>
3434
#include <csignal>
3535

36-
// This is to allow C++20 aggregate initialisation
37-
#pragma GCC diagnostic push
38-
#pragma GCC diagnostic ignored "-Wpedantic"
39-
4036
namespace o2::framework
4137
{
4238

Framework/Core/src/CommonServices.cxx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ using Metric = o2::monitoring::Metric;
7777
using Key = o2::monitoring::tags::Key;
7878
using Value = o2::monitoring::tags::Value;
7979

80-
// This is to allow C++20 aggregate initialisation
81-
#pragma GCC diagnostic push
82-
#pragma GCC diagnostic ignored "-Wpedantic"
83-
8480
O2_DECLARE_DYNAMIC_LOG(data_processor_context);
8581
O2_DECLARE_DYNAMIC_LOG(stream_context);
8682
O2_DECLARE_DYNAMIC_LOG(async_queue);
@@ -1327,4 +1323,3 @@ std::vector<ServiceSpec> CommonServices::arrowServices()
13271323
}
13281324

13291325
} // namespace o2::framework
1330-
#pragma GCC diagnostic pop

Framework/Core/src/runDataProcessing.cxx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,6 @@
134134
#include <unistd.h>
135135
#include <execinfo.h>
136136
#include <cfenv>
137-
// This is to allow C++20 aggregate initialisation
138-
#pragma GCC diagnostic push
139-
#pragma GCC diagnostic ignored "-Wpedantic"
140137
#if defined(__linux__) && __has_include(<sched.h>)
141138
#include <sched.h>
142139
#elif __has_include(<linux/getcpu.h>)

Framework/Core/test/test_ComputingQuotaEvaluator.cxx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
#include "Framework/ServiceRegistryHelpers.h"
2020
#include "uv.h"
2121

22-
#pragma GCC diagnostic push
23-
#pragma GCC diagnostic ignored "-Wpedantic"
2422
using namespace o2::framework;
2523

2624
TEST_CASE("TestComputingQuotaEvaluator")
@@ -219,5 +217,3 @@ TEST_CASE("TestComputingQuotaEvaluator")
219217
REQUIRE(evaluator.mOffers[1].valid == false);
220218
REQUIRE(evaluator.mOffers[2].valid == false);
221219
}
222-
223-
#pragma GGC diagnostic pop

Framework/Core/test/test_DataProcessorSpec.cxx

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
#include "Framework/DataProcessorSpecHelpers.h"
1515
#include "Framework/ConfigParamSpec.h"
1616

17-
#pragma GCC diagnostic push
18-
#pragma GCC diagnostic ignored "-Wpedantic"
19-
2017
TEST_CASE("TestDataProcessorSpecHelpers")
2118
{
2219
using namespace o2::framework;
@@ -35,5 +32,3 @@ TEST_CASE("TestDataProcessorSpecHelpers")
3532
REQUIRE(DataProcessorSpecHelpers::hasLabel(spec, "label2") == false);
3633
REQUIRE(DataProcessorSpecHelpers::hasLabel(spec, "label3") == true);
3734
}
38-
39-
#pragma diagnostic pop

Framework/Foundation/include/Framework/Signpost.h

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,10 @@ o2_log_handle_t* o2_walk_logs(bool (*callback)(char const* name, void* log, void
9090
#include <os/log.h>
9191
#include <os/signpost.h>
9292
#include <cstring>
93-
#define O2_LOG_DEBUG_MAC(log, ...) os_log_debug(private_o2_log_##log, __VA_ARGS__)
94-
// FIXME: use __VA_OPT__ when available in C++20
95-
#define O2_SIGNPOST_EVENT_EMIT_MAC(log, id, name, format, ...) os_signpost_event_emit(private_o2_log_##log->os_log, (uint64_t)id.value, name, format, ##__VA_ARGS__)
96-
#define O2_SIGNPOST_START_MAC(log, id, name, format, ...) os_signpost_interval_begin(private_o2_log_##log->os_log, (uint64_t)id.value, name, format, ##__VA_ARGS__)
97-
#define O2_SIGNPOST_END_MAC(log, id, name, format, ...) os_signpost_interval_end(private_o2_log_##log->os_log, (uint64_t)id.value, name, format, ##__VA_ARGS__)
93+
#define O2_LOG_DEBUG_MAC(log, format, ...) os_log_debug(private_o2_log_##log, format __VA_OPT__(, ) __VA_ARGS__)
94+
#define O2_SIGNPOST_EVENT_EMIT_MAC(log, id, name, format, ...) os_signpost_event_emit(private_o2_log_##log->os_log, (uint64_t)id.value, name, format __VA_OPT__(, ) __VA_ARGS__)
95+
#define O2_SIGNPOST_START_MAC(log, id, name, format, ...) os_signpost_interval_begin(private_o2_log_##log->os_log, (uint64_t)id.value, name, format __VA_OPT__(, ) __VA_ARGS__)
96+
#define O2_SIGNPOST_END_MAC(log, id, name, format, ...) os_signpost_interval_end(private_o2_log_##log->os_log, (uint64_t)id.value, name, format __VA_OPT__(, ) __VA_ARGS__)
9897
#define O2_SIGNPOST_ENABLED_MAC(log) os_signpost_enabled(private_o2_log_##log->os_log)
9998
#else
10099
// These are no-ops on linux.

0 commit comments

Comments
 (0)