> +++ b/gcc/inchash.h
> +class inchash
> +{
> + hashval_t val;
normal style would be explicit private: at the end.
> + public:
> +
> + /* Start incremential hashing, optionally with SEED. */
> + void begin (hashval_t seed = 0)
> + {
> + val = seed;
why isn't this the ctor?
> + /* Add unsigned value V. */
> + void add_int (unsigned v)
> + {
> + val = iterative_hash_hashval_t (v, val);
> + }
istm this is a great spot to provide a bunch of overloads of just add()
and let the compiler pick the appropriate one for your type.
thanks!
Trev