https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119336
--- Comment #3 from Simon Sobisch <simonsobisch at gnu dot org> --- Current output: t.cob:1:25: error: could not open copybook file for '"notthere"' 1 | COPY "notthere". | ^ t.cob:1:35: error: syntax error, unexpected '.', expecting IDENTIFICATION DIVISION or PROGRAM-ID 1 | COPY "notthere". | ^ --> the caret on the first line is at a better place --> the second line caret seems to hint at line 2 period, but showing line 1 Suggestion: if lexio does not found the file, then there was already an error produced - so instead of leaving the COPY statement in, it could just replace the copybook (with line directive to setup the right position in case of mult-line COPY statement). Then this would be resolved->fixed.