summaryrefslogtreecommitdiff
path: root/config_host
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-09-29 14:19:47 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-09-30 11:06:14 +0000
commite26188145238572580b9af18fbde4b824b341046 (patch)
tree5ab9a20b9c87b5bd4afb1f5610f45c4f99e99837 /config_host
parent638b6d7e0b8740d53c88dcde0c2b743a2184ccfa (diff)
Avoid unhelpful -Wunused-variable
...at least from "g++ (GCC) 5.1.1 20150618 (Red Hat 5.1.1-4)" with --disable-debug, when a namespace-scope const variable with a "complex" initializer declared in an include file remains unused. Avoid that warning via SAL_CONSTEXPR, which in turn requires large parts of o3tl::is_typed_flags to be SAL_CONSTEXPR, which in turn requires a new HAVE_CXX14_CONSTEXPR to allow assert in constexpr functions, which in turn requires using -std=c++14 instead of -std=c++11 where available, which in turn (a) requires to /not/ use -std=c++14 if it would run into a bug between Clang and libstdc++ discussed at <https://llvm.org/bugs/show_bug.cgi?id=24115> "llvm-nm fails to build with gcc 5.1's libstdc++" (and which hits us in sfx2/source/control/thumbnailview.cxx), and (b) requires a new HAVE_CXX14_SIZED_DEALLOCATION to work around GCC 5.1 -Werror=sized-deallocation (where Clang >= 3.7 only supports C++14 sized deallocation when explictly enabled via -fsized-deallocation, btw). This effectively reverts ff6462e6307e6924dc6c8178043ae9032f4b4152 "avoid unused variable warning:" again. Change-Id: I424e3561452a3e6d8c8a9604d6c737cab49840c4 Reviewed-on: https://gerrit.libreoffice.org/18918 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'config_host')
-rw-r--r--config_host/config_global.h.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in
index a029ff53c7e7..b2aa4da9353d 100644
--- a/config_host/config_global.h.in
+++ b/config_host/config_global.h.in
@@ -17,6 +17,8 @@ Any change in this header will cause a rebuild of almost everything.
#define HAVE_CXX11_FINAL 0
#define HAVE_CXX11_PERFECT_FORWARDING 0
#define HAVE_CXX11_CONSTEXPR 0
+#define HAVE_CXX14_CONSTEXPR 0
+#define HAVE_CXX14_SIZED_DEALLOCATION 0
#define HAVE_GCC_BUILTIN_ATOMIC 0
/* _Pragma */
#define HAVE_GCC_PRAGMA_OPERATOR 0