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