From c2a93e68d739d8972f16e27dec580e9a55618b70 Mon Sep 17 00:00:00 2001 From: Florian Pommerening Date: Wed, 1 Feb 2023 19:04:47 +0100 Subject: [PATCH] [trivial] Ignore use of former keyword register in OSI code. --- src/search/lp/lp_internals.cc | 10 ++++++++++ src/search/lp/lp_solver.cc | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/src/search/lp/lp_internals.cc b/src/search/lp/lp_internals.cc index fa13ffc11d..0ecd5bdbd4 100644 --- a/src/search/lp/lp_internals.cc +++ b/src/search/lp/lp_internals.cc @@ -16,6 +16,16 @@ #pragma GCC diagnostic ignored "-Wmisleading-indentation" #endif #endif + +/* + OSI uses the keyword 'register' which was deprecated for a while and removed + in C++ 17. Most compilers ignore it but clang 14 complains if it is still used. +*/ +#ifdef __clang__ +#pragma clang diagnostic ignored "-Wkeyword-macro" +#endif +#define register + #ifdef __clang__ #pragma GCC diagnostic ignored "-Wconstant-conversion" #endif diff --git a/src/search/lp/lp_solver.cc b/src/search/lp/lp_solver.cc index 691f14079d..b36bc4d8f3 100644 --- a/src/search/lp/lp_solver.cc +++ b/src/search/lp/lp_solver.cc @@ -11,6 +11,16 @@ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" #endif + +/* + OSI uses the keyword 'register' which was deprecated for a while and removed + in C++ 17. Most compilers ignore it but clang 14 complains if it is still used. +*/ +#ifdef __clang__ +#pragma clang diagnostic ignored "-Wkeyword-macro" +#endif +#define register + #include #include #include