------- Comment #12 from fxcoudert at gcc dot gnu dot org  2006-06-01 15:44 
-------
(In reply to comment #11)
> Index: arith.c
> ===================================================================
> --- arith.c     (revision 114111)
> +++ arith.c     (working copy)
> @@ -1133,8 +1133,10 @@ gfc_compare_string (gfc_expr * a, gfc_ex
> 
>    for (i = 0; i < len; i++)
>      {
> -      ac = (i < alen) ? a->value.character.string[i] : ' ';
> -      bc = (i < blen) ? b->value.character.string[i] : ' ';
> +      /* We cast to unsigned char because default char, if it is signed,
> +         would lead to ac<0 for string[i] > 127.  */
> +      ac = (unsigned char) ((i < alen) ? a->value.character.string[i] : ' ');
> +      bc = (unsigned char) ((i < blen) ? b->value.character.string[i] : ' ');
> 
>        if (xcoll_table != NULL)
>         {

OK. Although I still like better my previous patch, there's no point arguing
over this for years. Go ahead!


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|http://gcc.gnu.org/ml/fortra|
                   |n/2006-05/msg00489.html     |


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

Reply via email to