develooper Front page | perl.perl5.porters | Postings from February 2013

PL_fold_latin1 and regcomp.c compiler errors for Perl 5.17.10 on z/OS

Thread Next
From:
John Goodyear
Date:
February 25, 2013 14:50
Subject:
PL_fold_latin1 and regcomp.c compiler errors for Perl 5.17.10 on z/OS
Message ID:
OF96BADBAE.EA6047ED-ON85257B1C.0078418E-85257B1D.00515F84@us.ibm.com




Running Perl's make, the first item I ran up against was

   ERROR CCN3343 ./perl.h:4494  Redeclaration of PL_fold_latin1 differs
   from previous declaration on line 537 of "./utfebcdic.h".


I noticed that  Mariusz Stakowski posted this issue last year, and on June
3 (2012) Nicholas posted a test patch.   I applied the patch, which made
the compiler happy.

After that,  gv.c, miniperlmain.c, opmini.c, pad.c, perlmini.c,  perly.c,
and toke.o compiled OK.


The current issue is regcomp.c.

   `sh  cflags "optimize=''" regcomp.o` -c -Wc,XPLINK,dll,EXPORTALL
   regcomp.c
             CCCMD =  c89 -DPERL_CORE -c -2 -Wc,XPLINK -DMAXSIG=39 -DOEMVS
   -D_OE_SOCKETS -D_XOPEN_SOURCE_EXTENDED -D_ALL_SOURCE -DYYDYNAMIC
   -D_SHR_ENVIRON -DPERL_EXTERNAL_GLOB -Wc,dll -W 0,float(ieee)
   WARNING CCN3196 ./regcomp.c:12877 Initialization between types "unsigned
   long*" and "struct sv*" is not allowed.
   WARNING CCN3280 ./regcomp.c:12878 Function argument assignment between
   types "struct sv* const" and "unsigned long*" is not allowed.
   ERROR CCN3215 ./regcomp.c:12892 Too many arguments specified for macro
   _invlist_intersection.
   WARNING CCN3280 ./regcomp.c:12892 Function argument assignment between
   types "struct sv* const" and "unsigned long*" is not allowed.
   WARNING CCN3280 ./regcomp.c:12892 Function argument assignment between
   types "struct sv**" and "unsigned long**" is not allowed.
   ERROR CCN3215 ./regcomp.c:12893 Too many arguments specified for macro
   _invlist_intersection.
   WARNING CCN3280 ./regcomp.c:12893 Function argument assignment between
   types "struct sv* const" and "unsigned long*" is not allowed.
   ERROR CCN3045 ./regcomp.c:12893 Undeclared identifier PL_Alpha.
   WARNING CCN3280 ./regcomp.c:12893 Function argument assignment between
   types "struct sv**" and "unsigned long**" is not allowed.
   WARNING CCN3280 ./regcomp.c:12895 Function argument assignment between
   types "struct sv* const" and "unsigned long*" is not allowed



To address the errors,
   1) changed UV* to SV*     (seems
   2) removed the trailing comma in the invocations of
   _invlist_intersection()
   3) Changed PL_Alpha to PL_Latin1


Not knowing the history of this code, I want to be careful.   Fix 1 seems
like the right thing to do.  However for fix 3, I assumed that PL_Alpha was
changed to PL_Latin, but missed since the EBCDIC path probably hasn't been
compiled in a while.



/u/jgood/perlsrc/perl-f4b5e62 >diff -u regcomp.c regcomp.c.new
--- regcomp.c   Mon Feb 25 09:19:14 2013
+++ regcomp.c.new       Mon Feb 25 09:17:44 2013
@@ -12874,7 +12874,7 @@
 #ifndef EBCDIC
             cp_list = _add_range_to_invlist(cp_list, prevvalue, value);
 #else
-            UV* this_range = _new_invlist(1);
+            SV* this_range = _new_invlist(1);
             _append_range_to_invlist(this_range, prevvalue, value);

             /* In EBCDIC, the ranges 'A-Z' and 'a-z' are each not
contiguous.
@@ -12889,8 +12889,8 @@
                 && (prevvalue >= 'a' && value <= 'z')
                     || (prevvalue >= 'A' && value <= 'Z'))
             {
-                _invlist_intersection(this_range, PL_ASCII,
&this_range, );
-                _invlist_intersection(this_range, PL_Alpha,
&this_range, );
+                _invlist_intersection(this_range, PL_ASCII, &this_range );
+                _invlist_intersection(this_range, PL_Latin1,
&this_range );
             }
             _invlist_union(cp_list, this_range, &cp_list);
             literal_endpoint = 0;


John Goodyear
Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About