[PATCH] D46084: [Fixed Point Arithmetic] Addition of the Fixed Point _Accum type
Leonard Chan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 23 17:58:27 PDT 2018
leonardchan added inline comments.
Comment at: include/clang/Basic/DiagnosticCommonKinds.td:172
+def err_fixed_point_only_allowed_in_c : Error<
+ "Fixed point types are only allowed in C">;
> leonardchan wrote:
> > rsmith wrote:
> > > Diagnostics should not be capitalized. Also, we generally allow conforming C extensions to be used in other languages unless there is a really good reason not to.
> > We decided not to allow fixed point types in other languages because there is no specification provided in N1169 for addressing some features in other languages. Using C++ as an example, N1169 does not provide recommended characters when name mangling so we do not allow this in C++.
> Actually, scratch that. We will be enabling it since GCC does. Will update this and other relevant C++ related code appropriately.
Actually, the main thing that was preventing us from allowing this in C++ was no standardized characters for name mangling. GCC seems to use the same characters as some integral types (`short _Accum` uses `s`, `_Accum` uses `i`, ...) but this would mean that a function that takes a `short _Accum` as a sole argument would also be mangled the same as a similarly named function that takes a `short`.
Would copying GCC take priority over not having characters specific for these types? This standard also proposes 24 different types, of which only 6 are included in this patch.
More information about the cfe-commits