Re: [PATCH] Cast small-int values through intptr_t when they're passed as pointers.

2009-10-06 Thread Eric Anholt
On Mon, 2009-10-05 at 15:35 -0400, Adam Jackson wrote: On Sun, 2009-10-04 at 12:08 +1100, Daniel Stone wrote: On Fri, Oct 02, 2009 at 01:42:50PM -0700, Jamey Sharp wrote: On 64-bit systems, int and pointers don't have the same size, so GCC gives warnings about casts between int and

Re: [PATCH] Cast small-int values through intptr_t when they're passed as pointers.

2009-10-05 Thread Adam Jackson
On Sun, 2009-10-04 at 12:08 +1100, Daniel Stone wrote: On Fri, Oct 02, 2009 at 01:42:50PM -0700, Jamey Sharp wrote: On 64-bit systems, int and pointers don't have the same size, so GCC gives warnings about casts between int and pointer types. However, in the cases covered by this patch,

Re: [PATCH] Cast small-int values through intptr_t when they're passed as pointers.

2009-10-05 Thread Daniel Stone
On Mon, Oct 05, 2009 at 11:04:18AM -0700, Alan Coopersmith wrote: Daniel Stone wrote: On Fri, Oct 02, 2009 at 01:42:50PM -0700, Jamey Sharp wrote: On 64-bit systems, int and pointers don't have the same size, so GCC gives warnings about casts between int and pointer types. However, in the

Re: [PATCH] Cast small-int values through intptr_t when they're passed as pointers.

2009-10-04 Thread Matthieu Herrb
Daniel Stone wrote: On Fri, Oct 02, 2009 at 01:42:50PM -0700, Jamey Sharp wrote: On 64-bit systems, int and pointers don't have the same size, so GCC gives warnings about casts between int and pointer types. However, in the cases covered by this patch, it's always a value that fits in int

Re: [PATCH] Cast small-int values through intptr_t when they're passed as pointers.

2009-10-04 Thread Matthieu Herrb
Matthieu Herrb wrote: Daniel Stone wrote: On Fri, Oct 02, 2009 at 01:42:50PM -0700, Jamey Sharp wrote: On 64-bit systems, int and pointers don't have the same size, so GCC gives warnings about casts between int and pointer types. However, in the cases covered by this patch, it's always a

Re: [PATCH] Cast small-int values through intptr_t when they're passed as pointers.

2009-10-03 Thread Daniel Stone
On Fri, Oct 02, 2009 at 01:42:50PM -0700, Jamey Sharp wrote: On 64-bit systems, int and pointers don't have the same size, so GCC gives warnings about casts between int and pointer types. However, in the cases covered by this patch, it's always a value that fits in int being stored temporarily

[PATCH] Cast small-int values through intptr_t when they're passed as pointers.

2009-10-02 Thread Jamey Sharp
On 64-bit systems, int and pointers don't have the same size, so GCC gives warnings about casts between int and pointer types. However, in the cases covered by this patch, it's always a value that fits in int being stored temporarily as a pointer and then converted back later, which is safe.