develooper Front page | perl.perl5.porters | Postings from March 2006

PERL_FLEXIBLE_EXCEPTIONS never worked in stable

Thread Next
From:
Nicholas Clark
Date:
March 27, 2006 08:11
Subject:
PERL_FLEXIBLE_EXCEPTIONS never worked in stable
Message ID:
20060327161139.GA32132@plum.flirble.org
If you try to compile perl with PERL_FLEXIBLE_EXCEPTIONS defined on any stable
release, it will fail at in pp_ctl.c

`sh  cflags "optimize='-g'" pp_ctl.o`  pp_ctl.c
          CCCMD =  cc -DPERL_CORE -c -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -DPERL_FLEXIBLE_EXCEPTIONS -DDEBUGGING -fno-strict-aliasing -I/usr/local/include -g -Wall
pp_ctl.c:2528: error: conflicting types for 'S_docatch_body'
proto.h:1136: error: previous declaration of 'S_docatch_body' was here
pp_ctl.c:2528: error: conflicting types for 'S_docatch_body'
proto.h:1136: error: previous declaration of 'S_docatch_body' was here
pp_ctl.c: In function `S_docatch_body':
pp_ctl.c:2529: error: too few arguments to function `S_docatch_body'
pp_ctl.c: At top level:
pp_ctl.c:2535: error: conflicting types for 'S_docatch_body'
pp_ctl.c:2528: error: previous definition of 'S_docatch_body' was here
pp_ctl.c: In function `S_docatch':
pp_ctl.c:2564: warning: passing arg 3 of pointer to function from incompatible pointer type
pp_ctl.c: At top level:
proto.h:1136: warning: 'S_docatch_body' declared `static' but never defined
proto.h:1138: warning: 'S_vdocatch_body' declared `static' but never defined

This is because patch 5162 made this change on Feb 20th 2000.

+#ifdef PERL_FLEXIBLE_EXCEPTIONS
 STATIC void *
 S_docatch_body(pTHX_ va_list args)
 {
+    return docatch_body();
+}
+#endif
+
+STATIC void *
+S_docatch_body(pTHX)
+{
     CALLRUNOPS(aTHX);
     return NULL;
 }


ie there's a double, contradictory, definition of S_docatch_body.

The correct fix is to rename the earlier function S_vdocatch_body, and the
reference to it a bit below. But as we've had no bug reports in 6 years and
12 stable versions that this feature does not work, would it be better simply
to remove it here and now from 5.8.x ?

(see http://public.activestate.com/cgi-bin/perlbrowse?patch=5162 )

Nicholas Clark

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