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: unassignedclangb...@nondot.org
Reporter: ndesaulni...@google.com
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk, srhi...@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs