From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21413 invoked by alias); 28 May 2006 15:49:07 -0000 Received: (qmail 21258 invoked by uid 48); 28 May 2006 15:49:01 -0000 Date: Sun, 28 May 2006 15:49:00 -0000 Message-ID: <20060528154901.21257.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libfortran/27784] Comparison of strings with char(0) In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "fxcoudert at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-05/txt/msg02829.txt.bz2 List-Id: ------- Comment #1 from fxcoudert at gcc dot gnu dot org 2006-05-28 15:49 ------- 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; I was told that using memcmp is safe without checking it in configury, because it is present in libiberty if not in the system. -- fxcoudert at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fxcoudert at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27784