[Accepted as a DR at the November, 2023 meeting.]
(From editorial issue 6173.)
Subclause 7.6.9 [expr.rel] paragraph 4 and paragraph 5 specify:
The result of comparing unequal pointers to objects [ Footnote: ] is defined in terms of a partial order consistent with the following rules: ...
[Note 1: A relational operator applied to unequal function pointers or to unequal pointers to void yields an unspecified result. -- end note]
Comparing pointers to objects that are stored in a variable of type "pointer to void" should be fine.