public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/27784] Comparison of strings with char(0)
Date: Sun, 28 May 2006 16:05:00 -0000	[thread overview]
Message-ID: <20060528160536.30111.qmail@sourceware.org> (raw)
In-Reply-To: <bug-27784-10391@http.gcc.gnu.org/bugzilla/>



------- Comment #2 from tkoenig at gcc dot gnu dot org  2006-05-28 16:05 -------
(In reply to comment #1)
> What about simply doing:
> 
> Index: intrinsics/string_intrinsics.c
> ===================================================================
> --- intrinsics/string_intrinsics.c      (revision 113849)
> +++ intrinsics/string_intrinsics.c      (working copy)
> @@ -109,7 +109,7 @@
>    const char *s;
>    int len;
> 
> -  res = strncmp (s1, s2, (len1 < len2) ? len1 : len2);
> +  res = memcmp (s1, s2, (len1 < len2) ? len1 : len2);
>    if (res != 0)
>      return res;

Yes, this works.  I actually regtested and submitted this,
but somehow E-Mail to the fortran mailing list has been
broken for me.  Mabe the E-Mail will appear a bit later.

In the meantime, this patch is approved :-)

Thomas


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27784


  parent reply	other threads:[~2006-05-28 16:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-28 11:12 [Bug libfortran/27784] New: " tkoenig at gcc dot gnu dot org
2006-05-28 14:04 ` [Bug libfortran/27784] " tkoenig at gcc dot gnu dot org
2006-05-28 15:49 ` fxcoudert at gcc dot gnu dot org
2006-05-28 16:05 ` tkoenig at gcc dot gnu dot org [this message]
2006-05-28 16:28 ` fxcoudert at gcc dot gnu dot org
2006-06-19 22:27 ` [Bug libfortran/27784] [4.1 only] " fxcoudert at gcc dot gnu dot org
2006-06-20  6:04 ` fxcoudert at gcc dot gnu dot org
2006-06-20  6:14 ` [Bug libfortran/27784] " fxcoudert at gcc dot gnu dot org

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=20060528160536.30111.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@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).