https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122499
Bug ID: 122499
Summary: misspelt procedure in import list causes a sequence of
clutted errors
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: ---
Another candidate for spell hints. The mistake in the import list causes 4
extra error messages which don't add anything useful. Just having the first
error message (with a spelling hint) would be a significant improvement.
$ cat badimport2.mod
MODULE badimport2 ;
FROM StrIO IMPORT Writestring ;
BEGIN
END badimport2.
$ gm2 badimport2.mod
badimport2.mod:7:19: error: In program module ‘badimport2’: unknown symbol
‘Writestring’
7 | FROM StrIO IMPORT Writestring ;
| ^~~~~~~~~~~
badimport2.mod:7:19: error: In implementation module ‘StrIO’: unknown symbol
'Writestring' found
badimport2.mod:7:19: error: In definition module ‘StrIO’: unknown symbol
'Writestring' found
/home/gaius/opt/gccsh/latest/lib/gcc/x86_64-pc-linux-gnu/16.0.0/m2/m2pim/StrIO.def:57:10:
error: the symbols are unknown at the end of module ‘badimport2’ when requested
by another modules import (symbols have not been exported by the appropriate
definition module)
57 | END StrIO.
| ^
/home/gaius/opt/gccsh/latest/lib/gcc/x86_64-pc-linux-gnu/16.0.0/m2/m2pim/StrIO.mod:194:10:
error: In implementation module ‘StrIO’: the symbols are unknown at the end of
module ‘badimport2’ when requested by another modules import (symbols have not
been exported by the appropriate definition module)
194 | END StrIO.
| ^