|
|
|
|
|
by PhilipRoman
465 days ago
|
|
You could probably restrict function pointer values with something like this: if(fptr == x || fptr == y)
__builtin_unreachable()
Or... if(fptr != z && fptr != w)
__builtin_unreachable()
But I'm not sure how well today's compilers can take advantage of this. You'd need a strict mode, where any function pointer is assumed to be the worst case. At that point might as well go for a real proof assistant |
|