https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110019

            Bug ID: 110019
           Summary: Reported line numbers ar off-by-1 when preprocessing
                    source files
           Product: gcc
           Version: 13.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: ad...@tho-otto.de
  Target Milestone: ---

When preprocessing modula sources  with -fcpp, both the line number and the
quoted source line are off-by-1 in error reports.

Compiling eg:

MODULE foo;

BEGIN
  i := 0;
END foo.


gives:

foo.mod:3:3: error: In program module 'foo': unknown symbol 'i'
    3 | BEGIN
      |   ^
foo.mod:4:8: error: the following unknown symbols in module 'foo' were
unresolved: and i
    4 |   i := 0;
      |        ^


Additionally, the "and" in the summary of unresolved symbols is wrong.

Reply via email to