[PATCH] D46084: [Fixed Point Arithmetic] Addition of the Fixed Point _Accum type
JF Bastien via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 24 11:00:57 PDT 2018
jfb added a comment.
Can you also add a test for `_Bool _Accum`.
Also, `-enable-fixed-point -x c++` failing.
================
Comment at: lib/AST/ExprConstant.cpp:7361
+ case BuiltinType::ULongAccum:
+ // GCC does not cover FIXED_POINT_TYPE in it's switch stmt and defaults to
+ // no_type_class
----------------
"its"
================
Comment at: lib/Basic/TargetInfo.cpp:45
+ AccumWidth = AccumAlign = 32;
+ LongAccumWidth = LongAccumAlign = 64;
SuitableAlign = 64;
----------------
This seems weird because Targets which don't have these values for the non-Accum versions will have .e.g. `sizeof(short) != sizeof(short _Accum)`. Is there a point in ever having `_Accum` differ in size, width, and alignment from the underlying type? If not, can you set these values after the sub-target has specified its preferences?
Repository:
rC Clang
https://reviews.llvm.org/D46084
More information about the cfe-commits
mailing list