Implement checking for pthread_join

Török Edvin edwintorok@gmail.com
Sat Jan 5 19:36:00 GMT 2008


On Jan 4, 2008 4:41 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> gcc 4.1 will warn:
> warning: dereferencing type-punned pointer will break strict-aliasing rules
> and if you just removed the bogus and unnecessary casts, any gcc would warn
> too:
> warning: passing argument 2 of 'pthread_join' from incompatible pointer type

That is true, however the initial code that had the bug was like this:
int status;
...
pthread_join(id, (void **)(void *)&status);

(Which is a wrong fix for a gcc warning)

Maybe I should raise this on gcc bugzilla instead? (gcc could give me
some warning here).

> Your patch is complete overkill.

After you showed me that gcc can give warnings on similar construct I
have to agree.

Best regards,
Edwin



More information about the Libc-alpha mailing list