Yes I started looking in struct_decl. Is there a reason why it doesn't use an efficient unordered map for lookup, other than the extra code weight?
If that (and the cstr string type) is stripped down to its bare minimum, it would be perfect for general symbol tables. The only other fast C map I know of is khash (https://attractivechaos.github.io/klib
), however not memory efficient, and the codebase is somewhat bigger.
But, looking at tccgen.c, it may be too ambitious to integrate?