I see. For safety a run-time check is enough though.
But it turns out one can have a compile-time error forthis in C as well: https://godbolt.org/z/8E9z66cfs