On 24/02/2021 14:46, Timm Bäder wrote:
On 24/02/2021 14:16, Mark Wielaard wrote:
Hmmm. I am not sure why that doesn't work. What if you make them
explicitly unsinged (adding u at the end). Or does it simply ignore
the values and just warn because it sees the macro name and not an
explicit number?

I think I don't really understand anymore what this warning is warning
about.  Could you give an example of where this would flag something
that we would like to fix?

I found https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90885, which has a
few more use-cases (in the form of tweets but anyway). GCC might also
get this warning in the future.

For the clang implementation, see https://reviews.llvm.org/D63423

Looking at the code, it has an explicit "don't diagnose binary,
hexadecimal, octal literals" comment. Your suggestion of changing
to hexadecimal literals would work, but clang doesn't resolve the
macros first, see https://godbolt.org/z/3EMYY6.

--
Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Michael O'Neill, Tom Savage, Eric Shander

Reply via email to