This is an archive of the discontinued LLVM Phabricator instance.

Handle implicit conversion warnings
ClosedPublic

Authored by tlwilmar on Dec 9 2020, 8:58 AM.

Details

Summary

This patch partially prepares the runtime source code to be built with -Wconversion, which should trigger warnings if any implicit conversions can possibly change a value. For builds done with icc or gcc, all such warnings are handled in this patch. clang gives a much longer list of warnings, particularly for sign conversions, which the other compilers don't report. The -Wconversion flag is commented into cmake files, but I'm not going to turn it on. If someone thinks it is important, and wants to fix all the clang warnings, they are welcome to.

Types of changes made here involve either improving the consistency of types used so that no conversion is needed, or else performing careful explicit conversions, when we're sure a problem won't arise.

Patch is a combination of changes by Terry Wilmarth and Johnny Peyton.

Diff Detail

Repository
rOMP OpenMP

Event Timeline

tlwilmar created this revision.Dec 9 2020, 8:58 AM
tlwilmar requested review of this revision.Dec 9 2020, 8:58 AM
This revision is now accepted and ready to land.Dec 30 2020, 1:35 PM
This revision was automatically updated to reflect the committed changes.
protze.joachim added inline comments.
openmp/runtime/src/kmp.h
69

Might this new include cause the build failure in https://bugs.llvm.org/show_bug.cgi?id=49339 ?