diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-01-06 22:17:02 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-01-07 14:42:07 +0100 |
commit | d1a74c273d10e6ab228acac2b8ebc151362a41b3 (patch) | |
tree | 893f0f5b4c4e4142d0d8ac10ed4337ad1da45e9d /include/sal | |
parent | 1887d4f5e98960183ebac61d4ac931915e6f8d8d (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
Diffstat (limited to 'include/sal')
-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 |