https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109826
--- Comment #1 from Florian Weimer <fw at gcc dot gnu.org> --- I guess the main issue here is that the common type void * for both the second and third operand is implicitly converted to many pointer types, including the original types of those operands. So while converting to void * is harmless at first, it may still result in an incompatible-pointer-types for the overall expression.