> as discussed in [[ https://github.com/bitcoin/bitcoin/issues/17344 | #17344]]
>
> There is a large overlap between this list and Jason Turner's list of recommended compiler diagnostics in the Collaborative Collection of C++ Best Practices (cppbestpractices) project. There is also an overlap with the recommendations given in the C++ Core Guidelines (with editors Bjarne Stroustrup and Herb Sutter).
This is a backport of [[https://github.com/bitcoin/bitcoin/pull/19015 | core#19015]]
Disable `-Wduplicated-branches` for secp256k1, because of some exotic intentional use of ternary operator duplicated branches in test_inverse_scalar.