erichkeane wrote: > There are a few ways around this: if you are using c++17 or later, there is > `[[maybe_unused]]`. Another option is to ignore this warning in a specific > region with: > > ```c++ > #pragma clang diagnostic push > #pragma clang diagnostic ignored "-Wunused-private-field" > // your code for which the warning gets suppressed > #pragma clang diagnostic pop > // not suppressed here > ```
Note you can also spell the standard attribute as `__attribute__((unused))` in boht GCC and Clang. https://github.com/llvm/llvm-project/pull/116871 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits