Turning off the "'register' storage class specifier is deprecated" warning
In general, prepending no-
to an option turns it off. So if -Wdeprecated-register
enables the warning, then -Wno-deprecated-register
should disable it.
Alternatively, on many compilers you can use pragmas (or similar) in your code, to disable warnings while including particular headers while leaving them enabled for your own code. They are compiler-specific; for Clang, it's something like
#pragma clang diagnostic push#pragma clang diagnostic ignored "-Wdeprecated-register"#include "dodgy.hpp"#pragma clang diagnostic pop
(For GCC, the pragmas are the same, only replacing clang
with GCC
. I don't know about any other compilers.)