[llvm-bugs] [Bug 41467] New: -Wformat warnings for integer widening are too strict
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Apr 11 10:37:35 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41467
Bug ID: 41467
Summary: -Wformat warnings for integer widening are too strict
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: ndesaulniers at google.com
CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
richard-llvm at metafoo.co.uk, srhines at google.com
>From this LKML discussion: https://lkml.org/lkml/2019/4/11/639.
Simple patches for fixing -Wformat warnings in the Linux kernel are getting
rejected in cases where they warn about the format of a shorter integer using a
larger integer's format flag in cases where the shorter integer would undergo
standard C integer promotion when passed to printf-like functions.
This is making it difficult to enable a warning that generally helps catch more
nonsensical conversions. Is there maybe a way to create another -Wformat-less
strict flag that doesn't warn for integer widening like -Wformat, or create
-Wformat-pedantic which does warn on integer widening and remove warning on
that case in -Wformat?
https://github.com/ClangBuiltLinux/linux/issues/378
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190411/1c5517d9/attachment.html>
More information about the llvm-bugs
mailing list