[PATCH] D48727: [Fixed Point Arithmetic] Rename `-fsame-fbits` flag

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 28 09:53:51 PDT 2018


rjmccall accepted this revision.
rjmccall added a comment.
This revision is now accepted and ready to land.

In https://reviews.llvm.org/D48727#1146873, @leonardchan wrote:

> Oh, having the same number of fractional bits is what leads to unsigned types having one bit of padding, and vice versa.
>
> If this flag is set to false, then the integral and fractional parts of the unsigned types take up the whole bit width of the underlying scaled integer, with unsigned types gaining one extra fractional bit which would be taken by the sign bit in the signed types. When this flag is true, the number of fractional bits for unsigned types changes to match the signed types, but the number of integral bits stays the same, which leads to one unused padding bit.


Oh, of course.  Sorry for the confusion; LGTM.


Repository:
  rC Clang

https://reviews.llvm.org/D48727





More information about the cfe-commits mailing list