…though I now realise the lexically earlier errors could be printed last as a further convenience. It would involve the compiler in some tedious cacheing of error messages, but it's going to have to do that anyway, because it doesn't know the line numbers for any of the errors until it's finished. The alternative would be to cache the input file or make two passes, but hopefully the volume of errors emitted is less than the size of the source file. (Until you screw up entertainingly with C++, at any rate.)