Re: int problems on amd64



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 the "const void *" is actually an int value. By downcasting it
to int, gcc gives you a warning.

I don't think using setjmp and longjmp on GTK+ is such a good idea. For
long-running processing, use timeout or idle funtions or threads if you must.

longjmp()  and  setjmp()  are  useful  for  dealing  with  errors  and
interrupts encountered in a low-level subroutine of a program.
We have implemented an exception-like environment in standard C so we
need them.

Ciao,

        Fabio



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]