https://bugs.llvm.org/show_bug.cgi?id=44015

            Bug ID: 44015
           Summary: Wconversion warning not emitted
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangb...@nondot.org
          Reporter: leonardc...@google.com
                CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
                    richard-l...@metafoo.co.uk

Given the following:

```
void func(uint32_t);
void func4(uint32_t x) {
  func(sizeof(x) + x);
}
```

I would expect a `-Wconversion` warning on the call since the result of the
addition is 8 bytes, but gets truncated to 4 bytes. GCC v8.3.0 gives the
warning with `-Wconversion` enabled, but ToT clang does not.

-- 
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

Reply via email to