[PATCH] D46960: [Fixed Point Arithmetic] Predefined Precision Macros

Bevin Hansson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 23 00:36:44 PDT 2018


ebevhan added inline comments.


================
Comment at: include/clang/Lex/Preprocessor.h:185
+  // Fractional bits of _Accum types
+  IdentifierInfo *Ident__SACCUM_FBIT__;            // __SACCUM_FBIT__
+  IdentifierInfo *Ident__ACCUM_FBIT__;             // __ACCUM_FBIT__
----------------
You should not reserve identifiers like this for built-in limit/precision macros. See InitPreprocessor.cpp to see how it's supposed to be done.

We have implemented all of these (at least for DSP-C, but it should not be difficult to port this to Embedded-C) in our downstream port. You will also need routines to print fixed-point numbers for the rest of the macros in 7.18a.3. We can provide these patches on request.


Repository:
  rC Clang

https://reviews.llvm.org/D46960





More information about the cfe-commits mailing list