Hi, first of all: if this is not the appropriate list for this kind of question, please give me pointer to better one.
I am having problems with rebuilding my dcmtk package with g++ 4.0 on Sid. The problem seems to be related to type casting between pthread_t and unsigned long int types and vice versa by means of the `reinterpret_cast < > () operator'. With g++ 3.3 the package builds fine right out of the box. Here is a bare bone example to illustrate the problem: [EMAIL PROTECTED]:~$ cat thread2.cc #include <pthread.h> #include <unistd.h> #include <stdlib.h> void *thread_func(void *arg); int main() { pthread_t a_thread; unsigned long dummy; void *thread_result; pthread_create(&a_thread, NULL, thread_func, NULL); dummy = reinterpret_cast <unsigned long> (a_thread); pthread_join(a_thread, &thread_result); exit(EXIT_SUCCESS); } void *thread_func(void *arg) { sleep(3); pthread_exit(0); } [EMAIL PROTECTED]:~$ /usr/bin/g++-3.3 -Wall -D_REENTRANT thread2.cc -o thread2 -lpthread [EMAIL PROTECTED]:~$ /usr/bin/g++-4.0 -Wall -D_REENTRANT thread2.cc -o thread2 -lpthread thread2.cc: In function 'int main()': thread2.cc:13: error: invalid cast from type 'pthread_t' to type 'long unsigned int' [EMAIL PROTECTED]:~$ Any ideas? Regards - Juergen -- GPG A997BA7A | 87FC DA31 5F00 C885 0DC3 E28F BD0D 4B33 A997 BA7A
signature.asc
Description: Digital signature