That could be solved with a @ctfe attribute or something, no? Like, if the function has @ctfe, go through all possible CTFE paths (excluding !__ctfe paths of course) and make sure they are CTFEable.
Everything that's pure should be CTFEable which doesn't imply that you can turn every CTFEable function into a pure one.