boostorg / thread

Boost.org thread module
http://boost.org/libs/thread
198 stars 162 forks source link

Fix MinGW warnings about violation of the strict aliasing rules #262

Closed Lastique closed 5 years ago

Lastique commented 5 years ago

Use memcpy to convert between long and the bitfield structure and use memcmp to compare the two bitfields. Compilers should be smart enough to optimize away these string operations and generate virtually the same code as before.

viboes commented 5 years ago

Thaks for the PR.