[PATCH] D44559: [Sema] Wrong width of result of mul operation
Roman Lebedev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Mar 17 02:29:11 PDT 2018
lebedev.ri added a comment.
In https://reviews.llvm.org/D44559#1040799, @rjmccall wrote:
> I think we're correct not to warn here and that GCC/ICC are being noisy. The existence of a temporary promotion to a wider type doesn't justify warning on arithmetic between two operands that are the same size as the ultimate result. It is totally fair for users to think of this operation as being "closed" on the original type.
Could you please clarify, are you saying that PR35409 <https://bugs.llvm.org/show_bug.cgi?id=35409> is not a bug, and clang should continue to not warn in those cases?
If we would have "conversion sanitizer" <https://bugs.llvm.org/show_bug.cgi?id=21530>, detection of such problems would be easy, but without it, right now it is rather hard to detect such issues...
Repository:
rC Clang
https://reviews.llvm.org/D44559
More information about the cfe-commits
mailing list