[PATCH] D46084: [Fixed Point Arithmetic] Addition of the Fixed Point _Accum type

John McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 23 21:12:30 PDT 2018


rjmccall 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:
> leonardchan wrote:
> > 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.
That makes it sound like GCC ignores `_Accum` and just mangles the unmodified type, which is clearly a bug that should not be imitated.  You should raise this issue to the Itanium C++ ABI group and pick something unambiguous as a placeholder.


Repository:
  rC Clang

https://reviews.llvm.org/D46084





More information about the cfe-commits mailing list