public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/110003] New: Wrong source line listed for unused parameters
@ 2023-05-27 15:03 admin@tho-otto.de
  2023-06-03 12:53 ` [Bug modula2/110003] " gaius at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: admin@tho-otto.de @ 2023-05-27 15:03 UTC (permalink / raw)
  To: gcc-bugs

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

            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 procedure
'bla'
    3 | PROCEDURE bla(a: INTEGER);
      |               ^

That information is rather useless, because an unused parameter can only be
unused in the implementation.

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-27 15:03 [Bug modula2/110003] New: Wrong source line listed for unused parameters admin@tho-otto.de
2023-06-03 12:53 ` [Bug modula2/110003] " gaius at gcc dot gnu.org
2023-06-03 14:18 ` gaius at gcc dot gnu.org
2023-06-03 14:28 ` cvs-commit at gcc dot gnu.org
2023-06-03 14:29 ` gaius at gcc dot gnu.org
2023-07-29 12:48 ` 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).