Related (but different) question: Why are there no line numbers in the code listings?.
Some posters post blocks of code with line numbers. This generally does not make the code any easier to read (especially if it pushes long lines past the end of the box), and makes it substantially more difficult to copy-and-paste the code if someone wants to try it out.
I suggest that the posting software should check for formatted code blocks with line numbers, and suggest (but not require) that the poster should remove them. The message could also suggest adding a comment like
/* this is line 42 */ to any lines referred to by error messages.