Skip to content

Commit

Permalink
[trivial] Ignore use of former keyword register in OSI code.
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianPommerening committed Feb 2, 2023
1 parent 36c12bb commit 27d6a14
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/search/lp/lp_internals.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@
#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 __GNUG__
#if __GNUC__ >= 12
#pragma GCC diagnostic ignored "-Wkeyword-macro"
#endif
#endif
#ifdef __clang__
#pragma clang diagnostic ignored "-Wkeyword-macro"
#endif
#define register

#ifdef __clang__
#pragma GCC diagnostic ignored "-Wconstant-conversion"
#endif
Expand Down
15 changes: 15 additions & 0 deletions src/search/lp/lp_solver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,21 @@
#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 __GNUG__
#if __GNUC__ >= 12
#pragma GCC diagnostic ignored "-Wkeyword-macro"
#endif
#endif
#ifdef __clang__
#pragma clang diagnostic ignored "-Wkeyword-macro"
#endif
#define register

#include <OsiSolverInterface.hpp>
#include <CoinPackedMatrix.hpp>
#include <CoinPackedVector.hpp>
Expand Down

0 comments on commit 27d6a14

Please sign in to comment.