Casting to intptr_t states the intent of an integer to pointer cast
more clearly and ensures that the cast causes no loss of precision on
any platforms. LLP64 platforms eg. have a long value of 4 bytes and
pointer values of 8 bytes which may even cause compiler errors.
gcc/analyzer/ChangeLog:
PR analyzer/96608
* store.h (hash): Cast to intptr_t instead of long
hashval_t hash () const
{
- return (binding_key::impl_hash () ^ (long)m_region);
+ return (binding_key::impl_hash () ^ (intptr_t)m_region);
}
bool operator== (const symbolic_binding &other) const
{