diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-02-17 09:10:25 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-02-17 12:56:19 +0100 |
commit | cf07bcddd79beb6a0920384690a162c847801d7c (patch) | |
tree | b3261fdb6bf25475aa71539cfb80c2f84d085726 | |
parent | 05259e880db187f6698d6d545504775459d6e96a (diff) |
Drop -Wdeclaration-after-statement
It was introduced, without a rationale, into unxgcc.mk in
eb09adaa9a2accbdc3531bb96447c8e7fbb9f8a9 "Warn if declaration follows
statement in C-files", then carried over to clang-cl (com_MSC_defs.mk) with
9055fb48402eaeb9ba876b7893e2f9a39fea06b1 "clang-cl: Enable more warnings etc.
(like in the Clang/GCC case)", where it now started to cause
> cppuhelper/source/findsofficepath.c(102,20): error: mixing declarations and code is incompatible with standards before C99 [-Werror,-Wdeclaration-after-statement]
> const wchar_t* SUBKEYNAME = L"Software\\LibreOffice\\UNO\\InstallPath";
> ^
after
<https://github.com/llvm/llvm-project/commit/118f966b46cfb60897b56a9878e1c68fd0e2afa4>
"[clang][#51931] Enable -Wdeclaration-after-statement for all C versions".
Lets remove it from all toolchain settings, there appears to be not much value
anymore in such a warning about pre-C99 code.
Change-Id: Id4669089e46c97aaa926e5bd202c36eb5984b837
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130058
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | solenv/gbuild/platform/com_MSC_defs.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/platform/solaris.mk | 1 | ||||
-rw-r--r-- | solenv/gbuild/platform/unxgcc.mk | 1 |
3 files changed, 0 insertions, 3 deletions
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk index 7620adab7e79..364c0011f38a 100644 --- a/solenv/gbuild/platform/com_MSC_defs.mk +++ b/solenv/gbuild/platform/com_MSC_defs.mk @@ -280,7 +280,6 @@ gb_CXXCLRFLAGS := \ ifeq ($(COM_IS_CLANG),TRUE) gb_CFLAGS += \ - -Wdeclaration-after-statement \ -Wendif-labels \ -Wshadow \ -Wstrict-prototypes \ diff --git a/solenv/gbuild/platform/solaris.mk b/solenv/gbuild/platform/solaris.mk index 3f9e0fde335e..0f396dd8e80e 100644 --- a/solenv/gbuild/platform/solaris.mk +++ b/solenv/gbuild/platform/solaris.mk @@ -43,7 +43,6 @@ gb_OSDEFS := \ gb_CFLAGS := \ $(gb_CFLAGS_COMMON) \ -fPIC \ - -Wdeclaration-after-statement \ -Wshadow \ gb_CXXFLAGS := \ diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index c70e3ce222bb..a0aead205c12 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -39,7 +39,6 @@ gb_OSDEFS := \ gb_CFLAGS := \ $(gb_CFLAGS_COMMON) \ -fPIC \ - -Wdeclaration-after-statement \ -Wshadow \ # At least libstdc++ needs -pthread when including various C++ headers like <thread>, see |