diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-01-08 09:15:47 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-01-08 10:37:40 +0100 |
commit | 0376acf23308730450b3e259e72a9c8b35cabc0f (patch) | |
tree | 251899163424725e0cdf0fcae0666f81452f4b77 /solenv | |
parent | 985b76d237b26b428771bfc03d1ef74cdb5d77f0 (diff) |
Enable Clang -Wembedded-directive
...which might have helped avoid the confusion with patch set 6 of
<https://gerrit.libreoffice.org/c/core/+/84765/6> "python3: upgrade to release
3.7.6", in that it would have reported:
> pyuno/source/module/pyuno.cxx:340:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
> #if PY_VERSION_HEX >= 0x030200f0
> ^
> pyuno/source/module/pyuno.cxx:342:2: error: embedding a directive within macro arguments has undefined behavior [-Werror,-Wembedded-directive]
> #else
> ^
(-Wembedded-directive was introduced with <https://github.com/llvm/llvm-project/
commit/300237f00c7ddf9c74de96272f2bb571fda61202> "Add a warning flag for
ext_embedded_directive. gcc considers this undefined" in 2011, so should be
available in all versions of Clang relevant for us.)
Change-Id: I4d90212aac30ba8715496d8c99cc6de05c6dc99a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86394
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'solenv')
-rw-r--r-- | solenv/gbuild/platform/com_GCC_defs.mk | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk index 5cc24413bb45..9b61d6f3fb7f 100644 --- a/solenv/gbuild/platform/com_GCC_defs.mk +++ b/solenv/gbuild/platform/com_GCC_defs.mk @@ -62,6 +62,7 @@ gb_CFLAGS_COMMON := \ -Wundef \ -Wunreachable-code \ $(if $(and $(COM_IS_CLANG),$(or $(findstring icecc,$(CC)),$(findstring icecc,$(CCACHE_PREFIX)))),,-Wunused-macros) \ + $(if $(COM_IS_CLANG),-Wembedded-directive) \ -finput-charset=UTF-8 \ -fmessage-length=0 \ -fno-common \ @@ -78,6 +79,7 @@ gb_CXXFLAGS_COMMON := \ -Wundef \ -Wunreachable-code \ $(if $(and $(COM_IS_CLANG),$(or $(findstring icecc,$(CC)),$(findstring icecc,$(CCACHE_PREFIX)))),,-Wunused-macros) \ + $(if $(COM_IS_CLANG),-Wembedded-directive) \ -finput-charset=UTF-8 \ -fmessage-length=0 \ -fno-common \ |