Re: Fw: [cxx-abi-dev] Decimal Floating Point mangling was(Fw: [cxx-abi-dev] C++0x: Mangling of rvalue reference type)s
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fw: [cxx-abi-dev] Decimal Floating Point mangling was(Fw: [cxx-abi-dev] C++0x: Mangling of rvalue reference type)s



Hi Michael,

I am not sure what you said "Absolutely not" to.

> The point is that for platforms that support native types, the
> native type mangling is available for a potentially more efficient
> implementation. For platforms that can only support emulation,
> the class library type and its mangling is available. Have I missed
> the point?

I may have misunderstood what you are saying, if so, please correct me.
The current C++ TR specification permits an implementation to choose to implement the Decimal FP types as either a native type or a class type, if it preserves the semantics of a class type. If the mangling for the type are different based on how they are implemented, it removes a lot of flexibility from this choice.

PremAnand.

Michael Wong wrote:
Absolutely not. That would be silly even to me.
I want to settle the mangling chosen for the native type for platforms that
can support it. I am not saying there should not coexists different
manglings for class types and native types.
What Mark wanted, I believe was a rationale to explain why there  exists
both types and their mangling and that is what I am seeing a convergence
here in this discussion, for which I am glad.
The point is that for platforms that support native types, the native type
mangling is available for a potentially more efficient implementation. For
platforms that can only support emulation, the class library type and its
mangling is available. Have I missed the point?

What I was hoping to ask was if people are sufficiently happy with this
state so that I can write up the mangling addendum proposal?

Michael Wong
XL C++ Compiler kernel Development
IBM Canada Ltd., C2/KD2/8200/MKM
8200 Warden Avenue
Markham, Ontario  L6G 1C7
W:905-413-3283 F:905-413-4839
Boost test results
http://www-1.ibm.com/support/docview.wss?rs=2239&context=SSJT9L&uid=swg27006911

C/C++ Compilers Support Page
http://www.ibm.com/software/awdtools/ccompilers/support/
C/C++ Feature Request Interface
http://www.ibm.com/support/docview.wss?uid=swg27005811
XL Fortran Compiler Support Page
http://www.ibm.com/software/awdtools/fortran/xlfortran/support/
XL Fortran Feature Request Interface
http://www.ibm.com/support/docview.wss?uid=swg27005812


Sean Perry/Toronto/IBM @IBMCA To Michael Wong/Toronto/IBM@IBMCA 08/20/2007 09:28 cc AM cxx-abi-dev@xxxxxxxxxxxxxxxx, Dennis Handly <dhandly@xxxxxxxxxx>, premanand.rao@xxxxxx Subject Re: Fw: [cxx-abi-dev] Decimal Floating Point mangling was(Fw: [cxx-abi-dev] C++0x: Mangling of rvalue reference type)s



Are you trying to say that the C++ class type shall be binary compatible
with the C native type?  That is going to fail immediately on parameter
passing and return values.  And if we say that, then someone can throw a C
native type and catch it as the C++ class type.  Similar odd behaviour
would happen with dynamic casting.  The fact is that we have two different
types because C++ choose to implement decimal floating point as a class.
We need two different mangling schemes.

--
Sean Perry
Compiler Development
IBM Canada Lab
(905)-413-6031 (tie 969-6031), fax (905)-413-4839




             Michael
             Wong/Toronto/IBM
                                                                        To
             08/20/2007 08:23          Dennis Handly <dhandly@xxxxxxxxxx>
             AM                                                         cc
                                       cxx-abi-dev@xxxxxxxxxxxxxxxx,
                                       premanand.rao@xxxxxx, Sean
                                       Perry/Toronto/IBM@IBMCA
                                                                   Subject
                                       Re:  Fw: [cxx-abi-dev] Decimal
                                       Floating Point mangling was(Fw:
                                       [cxx-abi-dev] C++0x: Mangling of
                                       rvalue reference type)s(Document
                                       link: Sean Perry)









I believe one of the point of an ABI is to settle on one type where there
are ambiguity or possible differences in choices. Otherwise, it is not an
ABI and there would be no interoperability.
So I agree with Dennis that having both types would be confusing. I have no
problem putting forward a case in the ABI document to support the native
DFP type choice. In fact, I believe this was one of the thing that Mark
Mitchell had asked me to do after coming up with a mangling scheme. I am
somewhat glad that we have converged to that same point of view.

Is this agreed?

Michael Wong
XL C++ Compiler kernel Development
IBM Canada Ltd., C2/KD2/8200/MKM
8200 Warden Avenue
Markham, Ontario  L6G 1C7
W:905-413-3283 F:905-413-4839
Boost test results
http://www-1.ibm.com/support/docview.wss?rs=2239&context=SSJT9L&uid=swg27006911


C/C++ Compilers Support Page
http://www.ibm.com/software/awdtools/ccompilers/support/
C/C++ Feature Request Interface
http://www.ibm.com/support/docview.wss?uid=swg27005811
XL Fortran Compiler Support Page
http://www.ibm.com/software/awdtools/fortran/xlfortran/support/
XL Fortran Feature Request Interface
http://www.ibm.com/support/docview.wss?uid=swg27005812

Dennis Handly <dhandly@xxxxxxxxxx> wrote on 08/17/2007 09:19:44 PM:

From: Sean Perry <perry@xxxxxxxxxx>
Yes, the native type and the standard class are different types.
Then this may cause conflicts between the vendor's compiler and the
foreign
devil compilers if they try to interoperate and each does it differently.

I suppose an extern "C" interface would work to get around the mangling
issues.  At least for decimal.  Complex may have other issues.