https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70463

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #0)
> From https://bugzilla.redhat.com/show_bug.cgi?id=1315388
> 
> 
>     const unsigned char mask = 0xf;
> 
>     inline unsigned char key(const void* addr)
>     { return _Hash_impl::hash(addr) & mask; }
> 
> This always returns 0 when addresses are 4-byte aligned.

Bah, no it doesn't. That's what std::hash<void*> does, but not
_Hash_impl::hash.

Reply via email to