I have about 40 functions and I want to know if a given pointer is one of those function. Ideally I'd check if the address in question was >= the address of the first of the functions and <= the last. But when I have the functions defined in sequence the addresses are not in that order... Obviously there are other, slower ways to check (hash table/set, or binary search on a sorted array), but the ordered comparison is the best way.
I had defined them in a top-level const struct, but I could define them at the top level in a file if that would produce a reliable ordering. Are they maybe on alphabetical order? It's probably irrelevant, but all 40 functions have the same type signature.
Thanks, in advance!