On Mon, Sep 18, 2023 at 11:53:19AM +0200, René Scharfe wrote:
Am 11.09.23 um 21:19 schrieb Junio C Hamano:
Yup, that does cross my mind, even though I would have used
union {
void *void_ptr;
int *int_ptr;
} value;
or something without a rather meaningless 'u'.
OK, but I neglected to ask what we would get out of throwing different
types into the same bin.
It complicates type safety by making it impossible for the parser to
distinguish the used type. [...]
this is somewhat ironic, given that using a union has some semantic
value by illustrating that the fields are mutually exclusive.
but i'm not sure that the checking is really important here, given that
the initializers are inside centralized macros anyway.
regards