This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r253877 - in /trunk/gcc: fortran/ChangeLog fort...
- From: aldot at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Thu, 19 Oct 2017 07:24:33 -0000
- Subject: r253877 - in /trunk/gcc: fortran/ChangeLog fort...
Author: aldot
Date: Thu Oct 19 07:24:33 2017
New Revision: 253877
URL: https://gcc.gnu.org/viewcvs?rev=253877&root=gcc&view=rev
Log:
Use Levenshtein spelling suggestions in Fortran FE
gcc/fortran/ChangeLog
2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* gfortran.h (gfc_lookup_function_fuzzy): New declaration.
(gfc_closest_fuzzy_match): New declaration.
(vec_push): New definition.
* misc.c (gfc_closest_fuzzy_match): New definition.
* resolve.c: Include spellcheck.h.
(lookup_function_fuzzy_find_candidates): New static function.
(lookup_uop_fuzzy_find_candidates): Likewise.
(lookup_uop_fuzzy): Likewise.
(resolve_operator) <INTRINSIC_USER>: Call lookup_uop_fuzzy.
(gfc_lookup_function_fuzzy): New definition.
(resolve_unknown_f): Call gfc_lookup_function_fuzzy.
* interface.c (check_interface0): Likewise.
(lookup_arg_fuzzy_find_candidates): New static function.
(lookup_arg_fuzzy ): Likewise.
(compare_actual_formal): Call lookup_arg_fuzzy.
* symbol.c: Include spellcheck.h.
(lookup_symbol_fuzzy_find_candidates): New static function.
(lookup_symbol_fuzzy): Likewise.
(gfc_set_default_type): Call lookup_symbol_fuzzy.
(lookup_component_fuzzy_find_candidates): New static function.
(lookup_component_fuzzy): Likewise.
(gfc_find_component): Call lookup_component_fuzzy.
gcc/testsuite/ChangeLog
2017-10-19 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
* gfortran.dg/spellcheck-operator.f90: New testcase.
* gfortran.dg/spellcheck-procedure_1.f90: New testcase.
* gfortran.dg/spellcheck-procedure_2.f90: New testcase.
* gfortran.dg/spellcheck-structure.f90: New testcase.
* gfortran.dg/spellcheck-parameter.f90: New testcase.
Added:
trunk/gcc/testsuite/gfortran.dg/spellcheck-operator.f90
trunk/gcc/testsuite/gfortran.dg/spellcheck-parameter.f90
trunk/gcc/testsuite/gfortran.dg/spellcheck-procedure_1.f90
trunk/gcc/testsuite/gfortran.dg/spellcheck-procedure_2.f90
trunk/gcc/testsuite/gfortran.dg/spellcheck-structure.f90
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/gfortran.h
trunk/gcc/fortran/interface.c
trunk/gcc/fortran/misc.c
trunk/gcc/fortran/resolve.c
trunk/gcc/fortran/symbol.c
trunk/gcc/testsuite/ChangeLog