https://llvm.org/bugs/show_bug.cgi?id=26557
Bug ID: 26557 Summary: When casting an unsigned result of ~ operator to a larger integer type, MSVC warns on that Product: clang Version: trunk Hardware: PC OS: All Status: NEW Severity: enhancement Priority: P Component: -New Bugs Assignee: unassignedclangb...@nondot.org Reporter: r...@google.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified We found that when we build LLVM/Clang on a 64-bit Windows, the MSVC compiler prints out a few warnings about possible misuses of ~ operator. http://lab.llvm.org:8011/builders/lld-x86_64-win7/builds/29601/steps/build%20lld/logs/warnings%20%2811%29 It warns if an unsigned result of ~ is extended to a larger integer type. For example, if you have a function f(uint64_t) and a varaible x of type uint32_t, it warns on f(~x). This may be useful because for example the above case is not very obvious. Should we warn on the same thing? -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs