public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/110019] New: Reported line numbers ar off-by-1 when preprocessing source files
@ 2023-05-29 11:33 admin@tho-otto.de
  2023-06-06 21:52 ` [Bug modula2/110019] " gaius at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: admin@tho-otto.de @ 2023-05-29 11:33 UTC (permalink / raw)
  To: gcc-bugs

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: admin@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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-07-29 14:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-29 11:33 [Bug modula2/110019] New: Reported line numbers ar off-by-1 when preprocessing source files admin@tho-otto.de
2023-06-06 21:52 ` [Bug modula2/110019] " gaius at gcc dot gnu.org
2023-06-07  0:19 ` gaius at gcc dot gnu.org
2023-06-07  0:22 ` cvs-commit at gcc dot gnu.org
2023-06-07  0:23 ` gaius at gcc dot gnu.org
2023-07-29 14:16 ` cvs-commit at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).