Another reasonable idea is to have the compiler call the function for you.
Yeah, I was thinking that too. Heck, the compiler prolly uses it for reading source and writing errors.
Perhaps just special case hack the function it uses in the ctfe engine.