[cxx-abi-dev] decimal floating point support for C++

David Vandevoorde daveed at edg.com
Tue Aug 4 19:05:30 UTC 2009


On Aug 4, 2009, at 2:26 PM, Janis Johnson wrote:

> On Thu, 2009-07-30 at 11:09 -0700, Mark Mitchell wrote:
>> Jason Merrill wrote:
>>
>>>> Given that libstdc++ is used with compilers other than G++, is it
>>>> reasonable to depend on non-standard C++ compiler support?
>>>
>>> The question for this list is, rather, do we want to standardise the
>>> necessary compiler support?
>>
>> What support would we be standardizing?  Special handling of these
>> classes, or some source-level attribute for passing these classes  
>> as if
>> they were scalars, or ...?
>
> First off would be allowing the classes to use, internally, something
> like
>
>  typedef float _decfloat64 __attribute__((mode(DD)));
>
> or the equivalent for each compiler that uses libstdc++ and for which
> <decimal> would be supported.
>
> Secondly, a way to use that type for extern "C" function declarations
> (or perhaps a source-level attribute) to pass the class as a scalar
> using the target's ABI for decimal float types.


IMO the distinction should _not_ be based on extern "C" vs. extern "C+ 
+".  The classes should be marked as being just generally "magical" in  
that they're transferred like native _DecimalN types no matter what  
the calling convention.

We'd also need to clarify that such class types mangle with the Dd/De/ 
Df codes and not the usual class type rules.

	Daveed





More information about the cxx-abi-dev mailing list