Re: [Announce] Amaya 9.55 republished

On Tue, July 24, 2007 14:23, Emilien Kia wrote:
>> On Tue, July 24, 2007 07:54, Emilien Kia wrote:
>> >
>> > Hello
>> >
>> > In fact, it is not a problem of int/intprt_t in the declaration of the
>> internal structure but a problem of voidized pointer in the
>> > SetAttrValueToRange function.
>>
>> I have no idea what a 'voidized' pointer is, but casting a pointer (void
>> or not) to an int does not work well when sizeof(int)==4 and
>> sizeof(void*)==8.
>>
>> I'm curious to see what the proper fix is.
>>
>> Regis
>
> "Voidized" pointer is for void* pointer instead of a typed pointer.
>
> Here, we use a void* to pass int or char*.
> A proper manner should use a union ;-) .

Then you're mixing 2 different issues. You're talking about the
"dereferencing type-punned pointer will break strict-aliasing rules"
warning. What I get is a "cast from 'void*' to 'int' loses precision"
error, which you get from trying to store a 64 bits value into a 32 bits
variable. I can guaranty you that using a 'char*' instead of a 'void*'
won't change anything. It generates the same error, I've sent patches for
that case before, too.

> But the code will change as I will add some code.

As long as it builds and works, I'm fine. :)

Regis

Received on Tuesday, 24 July 2007 13:48:58 UTC