[PATCH] D46535: Correct warning on Float->Integer conversions.
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 8 13:17:45 PDT 2018
erichkeane added a comment.
In https://reviews.llvm.org/D46535#1091787, @efriedma wrote:
> The check for whether an input is "out of range" doesn't handle fractions correctly. Testcase:
>
> int a() { return 2147483647.5; }
> unsigned b() { return -.5; }
>
Hrm... For some reaosn I had it in my head that both of those were UB... Interestingly, EDG/ICC thinks the second one is. I'll look into this more to see if I can refine the warning.
Repository:
rC Clang
https://reviews.llvm.org/D46535
More information about the cfe-commits
mailing list