This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
locale.c: remove unnecessary cast
authorJerome Duval <jerome.duval@gmail.com>
Thu, 25 Apr 2019 21:19:43 +0000 (23:19 +0200)
committerKarl Williamson <khw@cpan.org>
Fri, 24 May 2019 23:09:29 +0000 (17:09 -0600)
This was failing in gcc 2.95.  The original commit added a cast, but we
figured out that removing this other one that really served no purpose
causes this compiler to work.

locale.c

index 87e11d6..50f3377 100644 (file)
--- a/locale.c
+++ b/locale.c
@@ -5052,9 +5052,7 @@ Perl__is_cur_LC_category_utf8(pTHX_ int category)
         Copy(delimited, utf8ness_cache, input_name_len_with_overhead - 1, char);
         utf8ness_cache[input_name_len_with_overhead - 1] = is_utf8 + '0';
 
-        if ((PL_locale_utf8ness[strlen(PL_locale_utf8ness)-1]
-                                                & (PERL_UINTMAX_T) ~1) != '0')
-        {
+        if ((PL_locale_utf8ness[strlen(PL_locale_utf8ness)-1] & ~1) != '0') {
             Perl_croak(aTHX_
              "panic: %s: %d: Corrupt utf8ness_cache=%s\nlen=%zu,"
              " inserted_name=%s, its_len=%zu\n",