Page MenuHomePhabricator

OpenMP RTL cleanup: eliminated warnings with -Wcast-qual

Authored by AndreyChurbanov on Jun 28 2017, 9:01 AM.


  • Main change is the usage of const_cast and reinterpret_cast instead of C-style type casts.
  • A lot of minor formatting changes done by clang-format (used version 3.8.1).
  • Changed type of several counters from unsigned to signed, as this is logical and also reduces the amount of needed casts.
  • Changed type of 32- and 64-bit bitwise intrinsics parameters from signed to unsigned.

Though the patch is big I tried to not change any functionality, just did the cleanup.
Any comments are welcome.

Diff Detail


Event Timeline

lebedev.ri accepted this revision.Jun 28 2017, 2:32 PM

Thank you!
I can confirm that with this + D33102, clang can finally fully self-host with no -Wcast-qual warnings.

Do note that i did not review the code!

This revision is now accepted and ready to land.Jun 28 2017, 2:32 PM
This revision was automatically updated to reflect the committed changes.