[9] RFR(L): 8037816 : Fix for 8036122 breaks build with Xcode5/clang
David Chase
david.r.chase at oracle.com
Thu May 8 11:06:54 UTC 2014
On 2014-05-08, at 3:37 AM, David Holmes <david.holmes at oracle.com> wrote:
> On 8/05/2014 11:13 AM, David Chase wrote:
>>
>> On 2014-05-07, at 7:59 PM, Coleen Phillimore <coleen.phillimore at oracle.com> wrote:
>>> So this has been a lot of work and a lot of information over email. I had one question - why isn't there a FORMAT type that can be used for void* ? Using these p2i functions is going to get really annoying.
>>
>> What I understand, from reading stackoverflow and poking around, is that %p does not have a uniform behavior across platforms; some of them prefix a 0x, others do not. I think there is variance in how the width can be specified, not sure.
>>
>> If we can sort out the %p variation, perhaps by defining PTR_FORMAT to be either 0x%p or %p depending on the platform, and if we can sort out width issues also, then we could get rid of INTPTR_FORMAT (convert to PTR_FORMAT) and remove the p2i casts.
>
> I hate to say this, but figuring out the compiler-specific behaviour for %p would seem to involve far less effort and change, than converting all pointers using p2i and changing from PTR_FORMAT to INTPTR_FORMAT. It may even be something that configure can work out for us at configure time ??
I have this nagging suspicion that you are right. I should at least make the effort to see what happens if I use a %08p format on all platforms of alleged interest.
David
More information about the hotspot-dev
mailing list