From d1a74c273d10e6ab228acac2b8ebc151362a41b3 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 6 Jan 2015 22:17:02 +0100 Subject: Silence unhelpful -Wpotentially-evaluated-expression ...on Clang trunk towards 3.6, firing for typeid(*e) where e is a side-effecting expression (of polymorphic pointer type). Simpler to disable it via #if in sal/config.h than to disable it in solenv/gbuild/platform/com_GCC_defs.mk with an additional feature test in configure.ac. Change-Id: If94692a9e06ff2659bf168b4968200aeee9ebb0a --- include/sal/config.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/sal') diff --git a/include/sal/config.h b/include/sal/config.h index edac79de14cf..93a4898b0202 100644 --- a/include/sal/config.h +++ b/include/sal/config.h @@ -86,6 +86,12 @@ #define SAL_CONFIGFILE( name ) name "rc" #endif +#if defined __clang__ +#if __has_warning("-Wpotentially-evaluated-expression") +#pragma GCC diagnostic ignored "-Wpotentially-evaluated-expression" +#endif +#endif + #endif // INCLUDED_SAL_CONFIG_H -- cgit v1.2.3