aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2020-05-29 10:46:57 -0600
committerTom Tromey <tromey@adacore.com>2020-06-03 06:19:06 -0600
commit079632de497a58a78971b8fc35cf3a52148857d1 (patch)
tree909af8a4618bd7412f5a1274c3b39d7ab973bca9 /gcc/fortran/trans-expr.c
parentf05c84ac139ccd5398542369aad2b5ff3059ced4 (diff)
downloadgcc-079632de497a58a78971b8fc35cf3a52148857d1.zip
gcc-079632de497a58a78971b8fc35cf3a52148857d1.tar.gz
gcc-079632de497a58a78971b8fc35cf3a52148857d1.tar.bz2
Prefer simple case changes in spelling suggestions
I got this error message when editing gcc and recompiling: ../../gcc/gcc/ada/gcc-interface/decl.c:7714:39: error: ‘DWARF_GNAT_ENCODINGS_all’ was not declared in this scope; did you mean ‘DWARF_GNAT_ENCODINGS_GDB’? 7714 | = debug_info && gnat_encodings == DWARF_GNAT_ENCODINGS_all; | ^~~~~~~~~~~~~~~~~~~~~~~~ | DWARF_GNAT_ENCODINGS_GDB This suggestion could be improved -- what happened here is that I failed to upper-case the word, and DWARF_GNAT_ENCODINGS_ALL was the correct spelling. This patch changes gcc's spell checker to prefer simple case changes when possible. I tested this using the self-tests. A new self-test is also included. gcc/ChangeLog: * spellcheck.c (CASE_COST): New define. (BASE_COST): New define. (get_edit_distance): Recognize case changes. (get_edit_distance_cutoff): Update. (test_edit_distances): Update. (get_old_cutoff): Update. (test_find_closest_string): Add case sensitivity test.
Diffstat (limited to 'gcc/fortran/trans-expr.c')
0 files changed, 0 insertions, 0 deletions