This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] analyzer: fix build error with clang (PR 93543)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: David Malcolm <dmalcolm at redhat dot com>
- Cc: Sebastian Huber <sebastian dot huber at embedded-brains dot de>, gcc at gcc dot gnu dot org
- Date: Tue, 4 Feb 2020 16:26:23 +0100
- Subject: Re: [PATCH] analyzer: fix build error with clang (PR 93543)
- References: <20200204140037.9388-1-dmalcolm@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Feb 04, 2020 at 09:00:37AM -0500, David Malcolm wrote:
> gcc/analyzer/ChangeLog:
> PR analyzer/93543
> * engine.cc (pod_hash_traits<function_call_string>::mark_empty):
> Eliminate reinterpret_cast.
> (pod_hash_traits<function_call_string>::is_empty): Likewise.
This is ok for trunk.
> gcc/analyzer/engine.cc | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/analyzer/engine.cc b/gcc/analyzer/engine.cc
> index 90f7067dec1..81b8a76c5eb 100644
> --- a/gcc/analyzer/engine.cc
> +++ b/gcc/analyzer/engine.cc
> @@ -2962,7 +2962,7 @@ template <>
> inline void
> pod_hash_traits<function_call_string>::mark_empty (value_type &v)
> {
> - v.m_fun = reinterpret_cast<function *> (NULL);
> + v.m_fun = NULL;
> }
> template <>
> inline bool
> @@ -2974,7 +2974,7 @@ template <>
> inline bool
> pod_hash_traits<function_call_string>::is_empty (value_type v)
> {
> - return v.m_fun == reinterpret_cast<function *> (NULL);
> + return v.m_fun == NULL;
> }
>
> namespace ana {
> --
> 2.21.0
Jakub