Change position of file name to conform current style.
Diff Detail
Event Timeline
I honestly don't think it is an improvement to change this message
error: cannot open foo.o: no such file
to
error: foo.o: cannot open: no such file
because the latter doesn't make sense as a sentence. Why do you want to change that?
Like I said earlier, I'd like to have the same format for error messages, so it's easier to parse and change format, when needed.
Those messages have ':' after 'cannot open <file>', which makes the above impossible. Do you have some idea on how to fix this?
A <file> in "cannot open <file>" is not a location where an error occurred. It's just a result of an error and an error location is somewhere else. For example, imagine that you have a linker script with an INPUT(<file>) command. If we fail to open that file, we want to print out something like this.
error: <linker-script>:308: cannot open <file>: no such file
instead of
error: <file>: cannot open: no such file
So, filename in this case does not indicate where an error happened. We should print out a location that made us open that file instead.