From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E4BE83858D35; Mon, 29 May 2023 11:33:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E4BE83858D35 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685360009; bh=k0EKizMsuIqY+b+fJUxWpdO05+Dgo75TPyYWBlJj1Fs=; h=From:To:Subject:Date:From; b=kgriGvQNC5zaWCazLYqfrCo3zoDOsHXbokPUEhEn79bj414TjlRriwjgWvzoe1XjE j09rhPkLUdOYlmhANdnDMzMYv9njvLHFiJcpe8zYOiHtjTkdZQd/33p+sQRrWsuG5i c30h3Eaolbd82bNOD4AU04IrALvbWYTztXpRljNc= From: "admin@tho-otto.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/110019] New: Reported line numbers ar off-by-1 when preprocessing source files Date: Mon, 29 May 2023 11:33:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: modula2 X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: admin@tho-otto.de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: gaius at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110019 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 :=3D 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 :=3D 0; | ^ Additionally, the "and" in the summary of unresolved symbols is wrong.=