[Openmp-dev] [RFC] Change compiler warnings for OpenMP runtimes

Jonas Hahnfeld via Openmp-dev openmp-dev at lists.llvm.org
Wed Aug 14 01:15:53 PDT 2019


On 2019-08-07 15:40, Jonas Hahnfeld via Openmp-dev wrote:
> Hi all,
> 
> I'd like to change the way how compiler warnings are handled for the
> OpenMP runtimes (libomp and libomptarget).
> tl;dr: I propose to enable all warnings from -Wall and selectively
> disable the ones that are not clean right now.
> 
> At the moment, the CMake configuration is not very consistent with
> respect to compiler warnings: In standalone builds, libomp enables some
> warnings while libomptarget is built with only the default warnings
> (none, or only flagging very broken code). When built in-tree, LLVM
> enables -Wall -Wextra -Wpedantic and then disables some warnings. As a
> result, the OpenMP runtimes get exposed to a much larger set of
> compiler warnings and from what I've seen, this basically renders the
> output from GCC unreadable because it's just full of text.
> 
> I like the concept of enabling all warnings and then disable some to
> get the build free of warnings. I've put together a patch [1] and I see
> no warnings with recent versions of Clang, GCC, and the Intel Compiler.
> Additionally, this scheme allows us to enable warnings not covered by
> the generic -Wall when helpful, as the linked patch already does.
> 
> In that patch, the set of disabled warnings is quite large, but having
> a list allows us to remove the -Wno-* arguments one-by-one and correct
> the code in question (if possible). I've already started with some easy
> ones [2-5] and I hope to do some others, but help would be welcome.
> 
> Feedback, comments, and / or review of the patches would be great!

So far, I've only heard positive voices and I plan to land the first 
batch of accepted patches tomorrow.

Thanks,
Jonas


More information about the Openmp-dev mailing list