diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-01-06 22:17:02 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-01-16 12:18:06 +0100 |
commit | 136014b52eeed89c562c2ab7a6fd9fd2d0fbe963 (patch) | |
tree | 298360fcda3b06526116568aeee99e3a0451f869 /include | |
parent | 42c261a9e459408653dd5dae548dcc5ba619cef1 (diff) |
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
(cherry picked from commit d1a74c273d10e6ab228acac2b8ebc151362a41b3)
Signed-off-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sal/config.h | 6 |
1 files changed, 6 insertions, 0 deletions
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 |