[PATCH] D47030: [Fixed Point Arithmetic] Checks for Precision Macros

Leonard Chan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 17 13:05:01 PDT 2018


leonardchan created this revision.
leonardchan added reviewers: phosek, mcgrathr, jakehehrlich.
leonardchan added a project: clang.
Herald added a subscriber: mgorny.

This patch includes checks that the precision macros used for the fixed point fractional and integral bits meet the requirements for clause 6.2.6.3 in http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1169.pdf.

Checks for any disagreements with the recommendations will throw warnings.

I also added my own warning that recommends the integral and fractional bits for _Accum types take up the width of the whole underlying integer to prevent having to mask out the padding bits when performing comparisons.


Repository:
  rC Clang

https://reviews.llvm.org/D47030

Files:
  cmake/modules/InitFixedPointBits.cmake

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47030.147379.patch
Type: text/x-patch
Size: 8320 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180517/042ace50/attachment-0001.bin>


More information about the cfe-commits mailing list