Hi, On Mon, 12 Nov 2018, Martin Liška wrote:
> > There's no fundamental reason why we can't poison identifiers in other > > headers. Indeed we do in vec.h. So move the whole thing including > > poisoning to hash-table.h? > > That's not feasible as gcc/gcc/genhooks.c files use the function and > we don't want to include hash-table.h in the generator files. gencfn-macros.c:#include "hash-table.h" genmatch.c:#include "hash-table.h" gentarget-def.c:#include "hash-table.h" So there's precedent. The other solution would be to ignore genhooks.c (i.e. let it continue using the non-typesafe variant), I'm not very worried about wrong uses creeping in there. It had like one material change in the last seven years. I think I prefer the latter (ignoring the problem). > So it's question whether it worth doing that? Jumping through hoops for generator files seems useless. But the general idea for your type-checking hashers for the compiler proper does seem useful. Ciao, Michael.