Hi,
Il 05/04/22 12:47, Matteo Bruni ha scritto:
One option to make these asserts more descriptive is to do something like:
assert(!"Non-numeric source expression");
What I'd really use for this kind of "control should never get here" construct is rather a helper marked as noreturn, so you don't have to add some awkward "return 0" or "break" just below to silence "non-void function does not return" warnings or similar. But I've never decided it was worthy enough of my time to actually write such a patch.
I am not opposed to a message either, but usually a line number is enough to understand what is the problem.
Giovanni.