X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=type_hash.c;h=4168dde37513ebc8a324814c3d67f7416a2ba7a2;hb=f017f4f5080052f95185056b3af472ab737bc64a;hp=ed071224a37b0b62c18ff43db6695944acc2067c;hpb=220bd1d88703eede6a4891f3014708c8259b303e;p=cparser diff --git a/type_hash.c b/type_hash.c index ed07122..4168dde 100644 --- a/type_hash.c +++ b/type_hash.c @@ -93,6 +93,8 @@ static unsigned hash_type(const type_t *type) case TYPE_INVALID: panic("internalizing void or invalid types not possible"); return 0; + case TYPE_ERROR: + return 0; case TYPE_ATOMIC: hash = hash_atomic_type(&type->atomic); break; @@ -239,6 +241,9 @@ static bool types_equal(const type_t *type1, const type_t *type2) return false; switch(type1->kind) { + case TYPE_ERROR: + /* Hmm, the error type is never equal */ + return false; case TYPE_INVALID: return false; case TYPE_ATOMIC: