http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59406

--- Comment #2 from g1pi at libero dot it ---
(In reply to Jonathan Wakely from comment #1)
> We're not really making any non-critical changes to TR1 code now.

Yet std::_Fnv_hash_bytes in non-TR1 code has the same problem (lines 116 and
161 of svn://gcc.gnu.org/svn/gcc/trunk/libstdc++-v3/libsupc++/hash_bytes.cc at
revision 205748).  The following program emits 83079839 instead of the expected
FNV-1a result.

#include <iostream>
#include <unordered_map>
int main() { 
    std::cout << std::_Fnv_hash_bytes("\x80", 1, 2166136261UL) << '\n';
}

Don't know if those functions are used somewhere or are leftovers.  The
comments in the file suggest that Murmur hash is used in the std::hash template
instead of FNV-1a.

Reply via email to