From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 893263858C53; Sat, 27 May 2023 15:03:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 893263858C53 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685199825; bh=nZdIsTasIFqbsWRHrmW7XIuDibxfuyE5HdZez+tBv90=; h=From:To:Subject:Date:From; b=iBoI1+E+oq46TDcUAw+/v1UQOzIj/TVAwJPsV/qSXPiF3gnPWXI9ZK9OTT/RVJXqZ 3jZfeQyrmi8NwB55QJDoTFp+GWGVpRuYBq1FOIJxHg9XHIU+vCOtwMn9YoseFSQPD3 6r1NLrz0fglLLzSeBGWloE3NTKzjPzsvyq8f4PGg= From: "admin@tho-otto.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug modula2/110003] New: Wrong source line listed for unused parameters Date: Sat, 27 May 2023 15:03:44 +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=3D110003 Bug ID: 110003 Summary: Wrong source line listed for unused parameters 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 compiling a module with -Wall and a parameter in the in implementation module is unused, the error message lists the source line of the definition module instead: DEFINITION MODULE foo; PROCEDURE bla(a: INTEGER); END foo. IMPLEMENTATION MODULE foo; PROCEDURE bla(a: INTEGER); BEGIN END bla; END foo. $ gm2 -c -Wall foo.mod ./foo.def:3:15: warning: In procedure 'bla': unused parameter 'a' in proced= ure 'bla' 3 | PROCEDURE bla(a: INTEGER); | ^ That information is rather useless, because an unused parameter can only be unused in the implementation.=