This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Implement checking for pthread_join


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]