]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/analyzer/ChangeLog
analyzer: fix build error with clang (PR 93543)
authorDavid Malcolm <dmalcolm@redhat.com>
Tue, 28 Jan 2020 21:31:01 +0000 (16:31 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Tue, 4 Feb 2020 15:38:56 +0000 (10:38 -0500)
commit1dae549dccfec1edb0cb4e65feadc4722bb3bcc8
tree869d1f94a51a843e74cf5b6ccc1cb8d6ea40ced4
parent5124c34fcc62f0f880ae947542678e28aa2ce703
analyzer: fix build error with clang (PR 93543)

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=243681 reports a build
failure with clang 9.0.1:

gcc/analyzer/engine.cc:2971:13: error:
      reinterpret_cast from 'nullptr_t' to 'function *' is not allowed
  v.m_fun = reinterpret_cast<function *> (NULL);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
engine.cc:2983:21: error:
      reinterpret_cast from 'nullptr_t' to 'function *' is not allowed
  return v.m_fun == reinterpret_cast<function *> (NULL);
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The casts appears to be unnecessary; eliminate them.

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.
gcc/analyzer/ChangeLog
gcc/analyzer/engine.cc