Re: int problems on amd64

2005-03-29 Thread Peter Bloomfield
On 03/29/2005 10:06:59 AM, Roland Smith wrote: [ snip ] I'm using GTK+ on FreeBSD 5.3 amd64 without problems. Any program casting int to void* is b0rken. ...which is why glib provides these: Peter ___

Re: int problems on amd64

2005-03-29 Thread Roland Smith
On Tue, Mar 29, 2005 at 05:28:35PM +0200, Fabio Rotondo wrote: > Roland Smith wrote: > > > I'm using GTK+ on FreeBSD 5.3 amd64 without problems. Any program > > casting int to void* is b0rken. > > you are perfectly right, but suppose you have to write a qsort callback: > > void qsort(void *base,

Re: int problems on amd64

2005-03-29 Thread Liam R. E. Quin
On Tue, 2005-03-29 at 17:28 +0200, Fabio Rotondo wrote: > Roland Smith wrote: > [...] suppose you have to write a qsort callback: > > void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const > void *, const void *)); > > suppose the "const void *" is actually an int value. By downcast

Re: int problems on amd64

2005-03-29 Thread Fabio Rotondo
Roland Smith wrote: > I'm using GTK+ on FreeBSD 5.3 amd64 without problems. Any program > casting int to void* is b0rken. you are perfectly right, but suppose you have to write a qsort callback: void qsort(void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *)); suppose

Re: int problems on amd64

2005-03-29 Thread Roland Smith
On Tue, Mar 29, 2005 at 01:37:47PM +0200, Fabio Rotondo wrote: > Hi, > > I have just switched to a brand new AMD 64, but I am experiencing some > problems in compiling my software. > Basically, gcc complains that my "int" is smaller than "void *" and that > the cast is dangerous. I know that int i