[PATCH] Dangerous long casts

Anders Rönnholm Anders.Ronnholm at evidente.se
Tue Dec 2 07:52:04 PST 2014


>I have a new check i'd like to get reviewed. It warns on dangerous long casts.
>int a = 105000;
>int b = 25000;
>long l = a*b; // possible truncation before conversion from 'int' to 'long'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: longcast.diff
Type: text/x-patch
Size: 4250 bytes
Desc: longcast.diff
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141202/bbc1b01a/attachment.bin>

More information about the cfe-commits mailing list