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

Doerfert, Johannes via Openmp-dev openmp-dev at lists.llvm.org
Sun Aug 11 00:11:47 PDT 2019


I'm very much in favor, warnings are just errors waiting to happen...

________________________________________
From: Openmp-dev <openmp-dev-bounces at lists.llvm.org> on behalf of David Greene via Openmp-dev <openmp-dev at lists.llvm.org>
Sent: Friday, August 9, 2019 11:08
To: Jonas Hahnfeld via Openmp-dev
Subject: Re: [Openmp-dev] [RFC] Change compiler warnings for OpenMP runtimes

+100.

                -David

Jonas Hahnfeld via Openmp-dev <openmp-dev at lists.llvm.org> writes:

> 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!
>
> Thanks,
> Jonas
>
> 1: https://reviews.llvm.org/D658672: https://reviews.llvm.org/D658683: https://reviews.llvm.org/D658694: https://reviews.llvm.org/D658705: https://reviews.llvm.org/D65871
>
> _______________________________________________
> Openmp-dev mailing list
> Openmp-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev
_______________________________________________
Openmp-dev mailing list
Openmp-dev at lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev


More information about the Openmp-dev mailing list