This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug c/77392] Premature optimization based on return data from thread


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77392

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
More to the point if do the following casts GCC would have errored out:
(void*)send_message
(void*)&thread_retval

Since you have the cast and in C, void* has an implicit cast to any other
pointer type, GCC does not error out.

I suspect you added those cast to allow the code to be accepted in the first
place and that is wrong.

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