https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122499
--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Gaius Mulley <[email protected]>: https://gcc.gnu.org/g:d66209cee5dda39ac4add589f4535f35c5736c63 commit r16-4941-gd66209cee5dda39ac4add589f4535f35c5736c63 Author: Gaius Mulley <[email protected]> Date: Sun Nov 2 21:44:03 2025 +0000 PR modula2/122499: misspelt procedure in import list causes clutter A misspelt ident in an import list causes a sequence of clutted errors. This bug fix filters unknowns built during import lists. It also checks for spelling mistakes against the modules exported identifiers. gcc/m2/ChangeLog: PR modula2/122499 * gm2-compiler/M2StackSpell.mod (PushName): Add comment. (GetSpellHint): Rewrite. (GetExportedSpellHint): New procedure function. (GetScopeSpellHint): New procedure function. * gm2-compiler/P1Build.bnf (IdentScope): Rewrite. (PossiblyExportIdent): Ditto. * gm2-compiler/P1SymBuild.mod (BuildImportInnerModule): Add parameter to AddNameToImportList. * gm2-compiler/SymbolTable.def (GetUnknownOnImport): New procedure function. (GetUnknownDeclScope): Ditto. (AddNameToScope): Add tok parameter. (AddNameToImportList): Ditto. * gm2-compiler/SymbolTable.mod (SymUndefined): New field declScope. New field onImport. (MakeObject): Add tok parameter. (FillInUnknownFields): Initialize declScope. Initialize onImport. (GetUnknownOnImport): New procedure function. (GetUnknownDeclScope): Ditto. (AddNameToScope): Pass tok to MakeObject. (AddNameToImportList): Add tok parameter. Pass tok to MakeObject. (GetDeclaredSym): Add parameters to FillInUnknownFields. (RequestSym): Ditto. (FetchUnknownFromModule): Ditto. (FetchUnknownFromDefImp): Ditto. (FetchUnknownFrom): Ditto. gcc/testsuite/ChangeLog: PR modula2/122499 * gm2.dg/spell/iso/fail/badimport2.mod: New test. * gm2.dg/spell/iso/fail/badimport3.mod: New test. * gm2.dg/spell/iso/fail/badimport4.mod: New test. Signed-off-by: Gaius Mulley <[email protected]>
