From: Jan Dubois Date: Sat, 13 Feb 1999 13:25:53 +0000 (+0100) Subject: "goto must have label" message for C X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1614b0e3dbf90c9b641852b6b2b5de79d17584fa;p=p5sagit%2Fp5-mst-13.2.git "goto must have label" message for C Message-Id: <36c9629c.13334874@smtp1.ibm.net> p4raw-id: //depot/perl@2908 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 435db65..1495514 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -1005,6 +1005,8 @@ file. Manual error checking can be done this way: =item dump LABEL +=item dump + This causes an immediate core dump. Primarily this is so that you can use the B program to turn your core dump into an executable binary after having initialized all your variables at the beginning of the diff --git a/pp_ctl.c b/pp_ctl.c index 405c344..2f66a5f 100644 --- a/pp_ctl.c +++ b/pp_ctl.c @@ -2026,6 +2026,7 @@ PP(pp_goto) OP *enterops[GOTO_DEPTH]; char *label; int do_dump = (PL_op->op_type == OP_DUMP); + static char must_have_label[] = "goto must have label"; label = 0; if (PL_op->op_flags & OPf_STACKED) { @@ -2279,12 +2280,15 @@ PP(pp_goto) RETURNOP(CvSTART(cv)); } } - else + else { label = SvPV(sv,n_a); + if (!(do_dump || *label)) + DIE(must_have_label); + } } else if (PL_op->op_flags & OPf_SPECIAL) { if (! do_dump) - DIE("goto must have label"); + DIE(must_have_label); } else label = cPVOP->op_pv; diff --git a/t/lib/io_unix.t b/t/lib/io_unix.t index ccb2748..30e7c0e 100644 --- a/t/lib/io_unix.t +++ b/t/lib/io_unix.t @@ -10,6 +10,11 @@ BEGIN { use Config; BEGIN { + if (!$Config{d_fork}) { + print "1..0\n"; + exit 0; + } + if(-d "lib" && -f "TEST") { if ( ($Config{'extensions'} !~ /\bSocket\b/ || $Config{'extensions'} !~ /\bIO\b/) &&