[llvm-bugs] [Bug 31415] New: Compiler should not warn about operator precedence by default
llvm-bugs at lists.llvm.org
Sat Dec 17 09:33:43 PST 2016
Bug ID: 31415
Summary: Compiler should not warn about operator precedence by
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: fuzxxl at gmail.com
CC: llvm-bugs at lists.llvm.org
clang has a number of diagnostics warning about code that uses the C operator
precedence table in a way some programmers misunderstand. This category of
warnings is occasionally useful in catching bugs.
However, these warnings should not be enabled by default (i.e. without any
-W... switched) as they usually do not indicate incorrect code. Indeed, full
usage of the C operator precedence rules is *not* indicative of a wrong program
and clang warning about that causes an exceptional amount of noise during
compilation of perfectly fine code. As by the guideline that all default
warnings should only be warnings that indicate serious problems or likely
mistakes, I believe that operator precedence warnings should not be enabled by
default. I request that they be disabled by default and only enabled if
explicitly requested (e.g. with -Wall).
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs