Hi Joerg, Thanks. After considering several alternatives, it seems that your suggestion to use __LDBL_MANT_DIGS__ is the one with least portability issue. I will update the patch in next revision.
Do you have further comments? Thanks. Logan On Thu, May 8, 2014 at 2:47 AM, Joerg Sonnenberger <[email protected]>wrote: > On Wed, May 07, 2014 at 11:52:57PM +0800, Logan Chien wrote: > > The long double to be parsed are the bit pattern of long double in > > hexadecimal. > > For example, 4001a000000000000000 in the mangled name stands for 0xap-1L > > (i.e. 5.0) > > That should depend on three factors at most, digits in the mantissa, > digits in the exponent and exponent bias. That said, I am not aware of > any platforms with 64bit mantissa and a representation different from > Intel 80bit intermediates. That's why I initially suggested the simpler > condition. > > > Although using __SIZEOF_LONG_DOUBLE__ is not a perfect solution, since > the > > additional padding might result in the overestimation of the number of > > bits. But it > > is sufficient to distinguish the targets as far as I know. Both 12 and > 16 > > are fine for > > the test case. > > IEEE quad precision should have quite a different bit layout? E.g. > SPARC64? > > Joerg > _______________________________________________ > cfe-commits mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits >
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
