On 2021-11-10 2:54 AM, Emilio Cobos Álvarez wrote:
* I think the real issue here is the implicit narrowing conversions
and integer promotions of C++, which we do have static analysis to
prevent (even if static analysis isn't always perfect, neither are the
diagnostics that compilers produce when you use signed types).
For a sense of scale, here are the number of mozilla-central warnings
for some clang diagnostics (disabled by default) related to integer
signedness and narrowing:
19,332 -Wsign-conversion warnings about implicit conversions that change
signedness.
12,373 -Wshorten-64-to-32 warnings about 64-bit ints narrowed to 32 bits.
2,701 -Wimplicit-int-conversion warnings about 16, 32, or 64-bit ints
narrowed to 16 or 8 bits.
https://clang.llvm.org/docs/DiagnosticsReference.html
--
You received this message because you are subscribed to the Google Groups
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/2b57d9ae-77d9-8568-aa2f-42268568f641%40mozilla.com.