Instead of hard-coded '0'/'UINT_MAX', we now use the 'RESERVED_LOCATION_P'
values 'UNKNOWN_LOCATION'/'BUILTINS_LOCATION' as spare values for
'Empty'/'Deleted', and generally simplify the code.
gcc/
* diagnostic-spec.h (typedef xint_hash_t)
(typedef xint_hash_map_t): Replace with...
(typedef nowarn_map_t): ... this.
(nowarn_map): Adjust.
* diagnostic-spec.c (nowarn_map, suppress_warning_at): Likewise.
/* A mapping from a 'location_t' to the warning spec set for it. */
-GTY(()) xint_hash_map_t *nowarn_map;
+GTY(()) nowarn_map_t *nowarn_map;
/* Return the no-warning disposition for location LOC and option OPT
or for all/any otions by default. */
return false;
if (!nowarn_map)
- nowarn_map = xint_hash_map_t::create_ggc (32);
+ nowarn_map = nowarn_map_t::create_ggc (32);
nowarn_map->put (loc, optspec);
return true;
return !(lhs == rhs);
}
-/* Per PR103157 "'gengtype': 'typedef' causing infinite-recursion code to be
- generated", don't use
- typedef int_hash<location_t, 0, UINT_MAX> xint_hash_t;
- here. */
-struct xint_hash_t : int_hash<location_t, 0, UINT_MAX> {};
-typedef hash_map<xint_hash_t, nowarn_spec_t> xint_hash_map_t;
+typedef hash_map<location_hash, nowarn_spec_t> nowarn_map_t;
/* A mapping from a 'location_t' to the warning spec set for it. */
-extern GTY(()) xint_hash_map_t *nowarn_map;
+extern GTY(()) nowarn_map_t *nowarn_map;
#endif // DIAGNOSTIC_SPEC_H_INCLUDED