OSDN Git Service

* config/i386/i386.md (*lea_1_rex64, *lea_1, *lea_1_zext,
[pf3gnuchains/gcc-fork.git] / libiberty / regex.c
index b7be99d..ad49684 100644 (file)
@@ -2,7 +2,9 @@
    version 0.12.
    (Implements POSIX draft P1003.2/D11.2, except for some of the
    internationalization features.)
-   Copyright (C) 1993-1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+   2002, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -1918,7 +1920,7 @@ static reg_errcode_t byte_compile_range (unsigned int range_start,
    ? (char) translate[(unsigned char) (d)] : (d))
 # else /* BYTE */
 #   define TRANSLATE(d) \
-  (translate ? (char) translate[(unsigned char) (d)] : (d))
+  (translate ? (char) translate[(unsigned char) (d)] : (char) (d))
 #  endif /* WCHAR */
 # endif
 
@@ -5908,11 +5910,14 @@ byte_re_match_2_internal (struct re_pattern_buffer *bufp,
            {
              /* 1 if this match ends in the same string (string1 or string2)
                 as the best previous match.  */
-             boolean same_str_p = (FIRST_STRING_P (match_end)
-                                   == MATCHING_IN_FIRST_STRING);
+             boolean same_str_p;
+
              /* 1 if this match is the best seen so far.  */
              boolean best_match_p;
 
+              same_str_p = (FIRST_STRING_P (match_end)
+                            == MATCHING_IN_FIRST_STRING);
+
              /* AIX compiler got confused when this was combined
                 with the previous declaration.  */
              if (same_str_p)
@@ -7921,7 +7926,7 @@ regcomp (regex_t *preg, const char *pattern, int cflags)
 
   if (cflags & REG_ICASE)
     {
-      unsigned i;
+      int i;
 
       preg->translate
        = (RE_TRANSLATE_TYPE) malloc (CHAR_SET_SIZE
@@ -7931,7 +7936,7 @@ regcomp (regex_t *preg, const char *pattern, int cflags)
 
       /* Map uppercase characters to corresponding lowercase ones.  */
       for (i = 0; i < CHAR_SET_SIZE; i++)
-        preg->translate[i] = ISUPPER (i) ? TOLOWER (i) : (int) i;
+        preg->translate[i] = ISUPPER (i) ? TOLOWER (i) : i;
     }
   else
     preg->translate = NULL;