public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jiu Fu Guo <guojiufu@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/guojiufu/heads/personal-branch)] fortran/95509 - fix spellcheck-operator.f90 regression
Date: Wed, 10 Jun 2020 03:42:10 +0000 (GMT)	[thread overview]
Message-ID: <20200610034210.88E483938C15@sourceware.org> (raw)

https://gcc.gnu.org/g:640e05e02b567fa5ccf4c207e6fc6c3e9a93b17c

commit 640e05e02b567fa5ccf4c207e6fc6c3e9a93b17c
Author: Tom Tromey <tromey@adacore.com>
Date:   Fri Jun 5 06:40:14 2020 -0600

    fortran/95509 - fix spellcheck-operator.f90 regression
    
    My earlier patch to add case handling to the spell checker caused a
    Fortran regression.  I believe I must have misread the test results.
    
    This patch fixes the problem by changing the cutoff.  I chose this
    value because the previous patch effectively multiplied the result of
    get_edit_distance by 2 (unless a case change is involved).
    
    gcc/fortran/ChangeLog:
    
            PR fortran/95509
            * misc.c (gfc_closest_fuzzy_match): Update cutoff value
            computation.

Diff:
---
 gcc/fortran/misc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/fortran/misc.c b/gcc/fortran/misc.c
index 0fc25df8a22..46c6277c2b9 100644
--- a/gcc/fortran/misc.c
+++ b/gcc/fortran/misc.c
@@ -397,7 +397,7 @@ gfc_closest_fuzzy_match (const char *typo, char **candidates)
      likely to be meaningless.  */
   if (best)
     {
-      unsigned int cutoff = MAX (tl, strlen (best)) / 2;
+      unsigned int cutoff = MAX (tl, strlen (best));
 
       if (best_distance > cutoff)
 	{


                 reply	other threads:[~2020-06-10  3:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200610034210.88E483938C15@sourceware.org \
    --to=guojiufu@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).