From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 00045385841D; Sat, 3 Jun 2023 14:28:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 00045385841D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685802524; bh=nU47Tif1AozaPD5uJ8jfjbickalT48qRJ+TOqBSi7Is=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZHsX0eg6PLyq2gsiDO/X3nzyer88dSrZ+IHIsEQXYpPCgK7Z6cSs9FBeIzhWkIuSv JjOeLKlneyKfy2PWxILvCjCnA0Jn7dk0hjWZYy4r++9E2eEudNWjw974i3I5eQgogi afrFoHtRreHSojtaPZdeJ3x4LxBwLwIKsjnaqM5Q= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/110003] Wrong source line listed for unused parameters Date: Sat, 03 Jun 2023 14:28:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed 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: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED 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: Message-ID: In-Reply-To: References: 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=3D110003 --- Comment #3 from CVS Commits --- The master branch has been updated by Gaius Mulley : https://gcc.gnu.org/g:7c0e2159afb3235950d3d8f61ef085cd1ccf0dfc commit r14-1520-g7c0e2159afb3235950d3d8f61ef085cd1ccf0dfc Author: Gaius Mulley Date: Sat Jun 3 15:27:58 2023 +0100 PR modula2/110003 Wrong source line listed for unused parameters Ensure that the parameter token position is recorded for both definition and implementation modules. The shadow variable is created inside BuildFormalParameterSection. The shadow variable needs to have the other definition or implementation module token position set when CheckFormalParameterSection is called. This allows the MetaError family of procedures to request the implementation module token position when reporting unused parameters. gcc/m2/ChangeLog: PR modula2/110003 * gm2-compiler/P2SymBuild.mod (GetParameterShadowVar): Import. (CheckFormalParameterSection): Call PutDeclared for the shadow variable associated with the parameter. Signed-off-by: Gaius Mulley =