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 c2a93e6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/search/lp/lp_internals.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions src/search/lp/lp_solver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <OsiSolverInterface.hpp>
#include <CoinPackedMatrix.hpp>
#include <CoinPackedVector.hpp>
Expand Down

0 comments on commit c2a93e6

Please sign in to comment.