https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122407
Bug ID: 122407
Summary: similar error messages are emitted for an unknown
symbol
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: modula2
Assignee: gaius at gcc dot gnu.org
Reporter: gaius at gcc dot gnu.org
Target Milestone: ---
$ gm2 badtype.mod
badtype.mod:8:14: error: In program module ‘badtype’: unknown symbol ‘Foo’, did
you mean foo?
8 | IF TSIZE (Foo) = 1
| ^~~
badtype.mod:8:14: error: SYSTEM procedure function TSIZE expects a variable or
type as its first parameter, seen unknown
The second message seems to add clutter, given that both errors are reporting
an unknown at the same location. It would be sensible to filter unknowns with
their location and only report the first. Reporting an unknown is linked to
the spellcheck module, so the potential is that the first message is
informative with a suggested fix.