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

Sean Perry perry at ca.ibm.com
Mon Aug 20 13:28:19 UTC 2007


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 at cup.hp.com>  
             AM                                                         cc 
                                       cxx-abi-dev at codesourcery.com,       
                                       premanand.rao at hp.com, Sean          
                                       Perry/Toronto/IBM at 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 at cup.hp.com> wrote on 08/17/2007 09:19:44 PM:

> >From: Sean Perry <perry at ca.ibm.com>
> >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.





More information about the cxx-abi-dev mailing list