https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122485
--- Comment #1 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:54a172402a844474dbf0d9dc0075e244174425d5 commit r16-4731-g54a172402a844474dbf0d9dc0075e244174425d5 Author: Gaius Mulley <[email protected]> Date: Thu Oct 30 11:19:08 2025 +0000 PR modula2/122485: add spell checking to module names This patch introduces spell checking during module imports. If the correct module name has been seen prior to the incorrect import then it will attempt to provide a hint during the error message. gcc/m2/ChangeLog: PR modula2/122485 * gm2-compiler/M2Comp.mod (Pass0CheckDef): Add spell check format specifier filtering on module names. * gm2-compiler/M2MetaError.mod (errorBlock): New field filterDef. (initErrorBlock): Initialize filterDef. (continuation): Add 'D' filter on definition module specifier. (SpellHint): Rewrite to check for filterDef and defimp symbols. (FilterOnDefinitionModule): New procedure. * gm2-compiler/M2Quads.mod (BuildSizeFunction): Rewrite to ensure variables are initialized. * gm2-compiler/M2StackSpell.def (GetDefModuleSpellHint): New procedure function. * gm2-compiler/M2StackSpell.mod (GetDefModuleSpellHint): New procedure function. (CandidatePushName): New procedure. (BuildHintStr): New procedure. (CheckForHintStr): Rewrite. gcc/testsuite/ChangeLog: PR modula2/122485 * gm2.dg/spell/iso/fail/badimport.mod: New test. Signed-off-by: Gaius Mulley <[email protected]>
