https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127622
Bug ID: 127622
Summary: spell checking candidates should include base module
and types
Product: gcc
Version: 17.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: ---
$ cat badspelltype.mod
(* { dg-do compile } *)
(* { dg-options "-g -c" } *)
MODULE badspelltype ;
VAR
a: CARDINAL ;
b: CARDINAl ;
(* { dg-error "unknown symbol 'CARDINAl', did you mean CARDINAL" "CARDINAl" {
target *-*-* } 9 } *)
BEGIN
IF a = b
THEN
END
END badspelltype.
$ gm2 badspelltype.mod
badspelltype.mod:9:7: error: In program module ‘badspelltype’: unknown symbol
‘CARDINAl’
9 | b: CARDINAl ;
| ^~~~~~~~
the error message should generate a hint containing CARDINAL