esac
rm -f _cflags.c _cflags$_exe
+# XXX There is something wrong in the below: furious editing on ccflags,
+# but that ccflags will be overwritten by the source of config.sh in the
+# extracted cflags.
+
case "$gccversion" in
'') ;;
*)
Perl_debop(pTHX_ const OP *o)
{
dVAR;
+ int count;
PERL_ARGS_ASSERT_DEBOP;
PerlIO_printf(Perl_debug_log, "(NULL)");
break;
- {
- int count;
-
case OP_PADSV:
case OP_PADAV:
case OP_PADHV:
PerlIO_printf(Perl_debug_log, ")");
}
break;
- }
default:
break;
@ISA = qw(Exporter);
@EXPORT = qw(writemain);
-$VERSION = '1.01';
+$VERSION = '1.02';
# blead will run this with miniperl, hence we can't use autodie or File::Temp
my $temp;
#endif /* PERL_GLOBAL_STRUCT */
exit(exitstatus);
- return exitstatus;
}
/* Register any extra external extensions */
case SVt_PVIO:
Perl_croak(aTHX_ "Cannot convert a reference to %s to typeglob",
sv_reftype(has_constant, 0));
- break;
+
default: NOOP;
}
SvRV_set(gv, NULL);
case regexp_amg:
/* FAIL safe */
return NULL; /* Delegate operation to standard mechanisms. */
- break;
+
case to_sv_amg:
case to_av_amg:
case to_hv_amg:
case to_cv_amg:
/* FAIL safe */
return left; /* Delegate operation to standard mechanisms. */
- break;
+
default:
goto not_found;
}
case to_cv_amg:
/* FAIL safe */
return left; /* Delegate operation to standard mechanisms. */
- break;
}
if (ocvp && (cv=ocvp[nomethod_amg])) { /* Call report method */
notfound = 1; lr = -1;
#endif
+/* ------------------ pp.c, regcomp.c, toke.c, universal.c ------------ */
+
+#define MAX_CHARSET_NAME_LENGTH 2
+
+PERL_STATIC_INLINE const char *
+get_regex_charset_name(const U32 flags, STRLEN* const lenp)
+{
+ /* Returns a string that corresponds to the name of the regex character set
+ * given by 'flags', and *lenp is set the length of that string, which
+ * cannot exceed MAX_CHARSET_NAME_LENGTH characters */
+
+ *lenp = 1;
+ switch (get_regex_charset(flags)) {
+ case REGEX_DEPENDS_CHARSET: return DEPENDS_PAT_MODS;
+ case REGEX_LOCALE_CHARSET: return LOCALE_PAT_MODS;
+ case REGEX_UNICODE_CHARSET: return UNICODE_PAT_MODS;
+ case REGEX_ASCII_RESTRICTED_CHARSET: return ASCII_RESTRICT_PAT_MODS;
+ case REGEX_ASCII_MORE_RESTRICTED_CHARSET:
+ *lenp = 2;
+ return ASCII_MORE_RESTRICT_PAT_MODS;
+ }
+ /* The NOT_REACHED; hides an assert() which has a rather complex
+ * definition in perl.h. */
+ NOT_REACHED; /* NOTREACHED */
+ return "?"; /* Unknown */
+}
+
/*
* Local variables:
* c-indentation-style: bsd
/* FIXME */
default:
Perl_croak(aTHX_ "Size magic not implemented");
- break;
+
}
- return 0;
+ NOT_REACHED; /* NOTREACHED */
}
/*
#endif /* PERL_GLOBAL_STRUCT */
exit(exitstatus);
- return exitstatus;
}
/* Register any extra external extensions */
default:
Perl_croak(aTHX_ "panic: op_contextualize bad context %ld",
(long) context);
- return o;
}
}
} break;
default: {
return NULL;
- } break;
+ } NOT_REACHED; /* NOTREACHED */
}
if (SvTYPE((SV*)cv) != SVt_PVCV)
return NULL;
break;
case '[': case ']':
goto oops;
- break;
+
case '\\':
proto++;
arg++;
else
goto oops;
goto again;
- break;
+
case ']':
if (contextclass) {
const char *p = proto;
OP** defer_queue[MAX_DEFERRED]; /* small queue of deferred branches */
int defer_base = 0;
int defer_ix = -1;
+ OP *fop;
+ OP *sop;
if (!o || o->op_opt)
return;
break;
- {
- OP *fop;
- OP *sop;
-
#define HV_OR_SCALARHV(op) \
( (op)->op_type == OP_PADHV || (op)->op_type == OP_RV2HV \
? (op) \
if ((fop = HV_OR_SCALARHV(cLOGOP->op_first)))
fop->op_private |= OPpTRUEBOOL;
#undef HV_OR_SCALARHV
- /* GERONIMO! */
- }
+ /* GERONIMO! */ /* FALLTHROUGH */
case OP_MAPWHILE:
case OP_GREPWHILE:
"\", line %d", STRINGIFY(what), __LINE__), \
(void) 0)))
+/* assert() gets defined if DEBUGGING (and I_ASSERT).
+ * If no DEBUGGING, the <assert.h> has not been included. */
#ifndef assert
# define assert(what) Perl_assert(what)
#endif
SvREFCNT_inc_void_NN(sv);
sv = MUTABLE_SV(gv);
}
- else if (!isGV_with_GP(sv))
- return (SV *)Perl_die(aTHX_ "Not a GLOB reference");
+ else if (!isGV_with_GP(sv)) {
+ Perl_die(aTHX_ "Not a GLOB reference");
+ }
}
else {
if (!isGV_with_GP(sv)) {
SvSETMAGIC(sv);
goto wasref;
}
- if (PL_op->op_flags & OPf_REF || strict)
- return (SV *)Perl_die(aTHX_ PL_no_usym, "a symbol");
+ if (PL_op->op_flags & OPf_REF || strict) {
+ Perl_die(aTHX_ PL_no_usym, "a symbol");
+ }
if (ckWARN(WARN_UNINITIALIZED))
report_uninit(sv);
return &PL_sv_undef;
return &PL_sv_undef;
}
else {
- if (strict)
- return
- (SV *)Perl_die(aTHX_
- S_no_symref_sv,
- sv,
- (SvPOKp(sv) && SvCUR(sv)>32 ? "..." : ""),
- "a symbol"
- );
+ if (strict) {
+ Perl_die(aTHX_
+ S_no_symref_sv,
+ sv,
+ (SvPOKp(sv) && SvCUR(sv)>32 ? "..." : ""),
+ "a symbol"
+ );
+ }
if ((PL_op->op_private & (OPpLVAL_INTRO|OPpDONT_INIT_GV))
== OPpDONT_INIT_GV) {
/* We are the target of a coderef assignment. Return
return G_ARRAY;
default:
Perl_croak(aTHX_ "panic: bad gimme: %d\n", cxstack[cxix].blk_gimme);
- assert(0); /* NOTREACHED */
- return 0;
}
+ NOT_REACHED; /* NOTREACHED */
}
I32
SvPVX_const(namesv),
SvUTF8(namesv) ? -(I32)SvCUR(namesv) : (I32)SvCUR(namesv),
G_DISCARD);
- retop = Perl_die(aTHX_ "%"SVf" did not return a true value",
- SVfARG(namesv));
+ Perl_die(aTHX_ "%"SVf" did not return a true value", SVfARG(namesv));
+ NOT_REACHED; /* NOTREACHED */
/* die_unwind() did LEAVE, or we won't be here */
}
else {
case e_star:
Perl_croak(aTHX_ "Within []-length '*' not allowed in %s",
_action( symptr ) );
- break;
+
default:
/* e_no_len and e_number */
len = symptr->length;
}
Perl_croak(aTHX_ "No group ending character '%c' found in template",
ender);
- return 0;
+ NOT_REACHED; /* NOTREACHED */
}
cuv = 0;
cdouble = 0;
continue;
- break;
+
case '(':
{
tempsym_t savsym = *symptr;
break;
case '/':
Perl_croak(aTHX_ "'/' must follow a numeric type in unpack");
- break;
+
case 'A':
case 'Z':
case 'a':
bool found = next_symbol(symptr);
bool utf8 = (symptr->flags & FLAG_PARSE_UTF8) ? 1 : 0;
bool warn_utf8 = ckWARN(WARN_UTF8);
+ char* from;
PERL_ARGS_ASSERT_PACK_REC;
(int) TYPE_NO_MODIFIERS(datumtype));
case '%':
Perl_croak(aTHX_ "'%%' may not be used in pack");
- {
- char *from;
+
case '.' | TYPE_IS_SHRIEKING:
case '.':
if (howlen == e_star) from = start;
goto shrink;
}
break;
- }
+
case '(': {
tempsym_t savsym = *symptr;
U32 group_modifiers = TYPE_MODIFIERS(datumtype & ~symptr->flags);
exsv = newSVpvs_flags("Died", SVs_TEMP);
}
}
- return die_sv(exsv);
+ die_sv(exsv);
+ NOT_REACHED; /* NOTREACHED */
}
/* I/O. */
bool is_open = 0;
I32 freeze_paren = 0;
I32 after_freeze = 0;
+ I32 num; /* numeric backreferences */
char * parse_start = RExC_parse; /* MJD */
char * const oregcomp_parse = RExC_parse;
nextchar(pRExC_state);
return ret;
/*notreached*/
- { /* named and numeric backreferences */
- I32 num;
+ /* named and numeric backreferences */
case '&': /* (?&NAME) */
parse_start = RExC_parse - 1;
named_recursion:
*flagp |= POSTPONED;
nextchar(pRExC_state);
return ret;
- } /* named and numeric backreferences */
+
assert(0); /* NOT REACHED */
case '?': /* (??...) */
char *parse_start = RExC_parse;
U8 op;
int invert = 0;
+ U8 arg;
GET_RE_DEBUG_FLAGS_DECL;
literal text handling code.
*/
switch ((U8)*++RExC_parse) {
- U8 arg;
/* Special Escapes */
case 'A':
RExC_seen_zerolen++;
break;
default:
Perl_croak(aTHX_ "panic: unknown regstclass %d", (int)OP(c));
- break;
}
return 0;
got_it:
/* Be paranoid... */
if (prog == NULL || stringarg == NULL) {
Perl_croak(aTHX_ "NULL regexp parameter");
- return 0;
}
DEBUG_EXECUTE_r(
break;
default:
Perl_croak(aTHX_ "panic: Unexpected FLAGS %u in op %u", FLAGS(scan), OP(scan));
- break;
}
}
/* Note requires that all BOUNDs be lower than all NBOUNDs in
# error "RXf_SPLIT does not match RXf_PMf_SPLIT"
#endif
-/* Manually decorate this function with gcc-style attributes just to
- * avoid having to restructure the header files and their called order,
- * as proto.h would have to be included before this file, and isn't */
-
-PERL_STATIC_INLINE const char *
-get_regex_charset_name(const U32 flags, STRLEN* const lenp)
- __attribute__warn_unused_result__;
-
-#define MAX_CHARSET_NAME_LENGTH 2
-
-PERL_STATIC_INLINE const char *
-get_regex_charset_name(const U32 flags, STRLEN* const lenp)
-{
- /* Returns a string that corresponds to the name of the regex character set
- * given by 'flags', and *lenp is set the length of that string, which
- * cannot exceed MAX_CHARSET_NAME_LENGTH characters */
-
- *lenp = 1;
- switch (get_regex_charset(flags)) {
- case REGEX_DEPENDS_CHARSET: return DEPENDS_PAT_MODS;
- case REGEX_LOCALE_CHARSET: return LOCALE_PAT_MODS;
- case REGEX_UNICODE_CHARSET: return UNICODE_PAT_MODS;
- case REGEX_ASCII_RESTRICTED_CHARSET: return ASCII_RESTRICT_PAT_MODS;
- case REGEX_ASCII_MORE_RESTRICTED_CHARSET:
- *lenp = 2;
- return ASCII_MORE_RESTRICT_PAT_MODS;
- default:
- return "?"; /* Unknown */
- }
-}
-
/* Do we have some sort of anchor? */
#define RXf_IS_ANCHORED (1<<(RXf_BASE_SHIFT+0))
#define RXf_UNUSED1 (1<<(RXf_BASE_SHIFT+1))
else
Perl_croak(aTHX_ "Bizarre copy of %s", type);
}
- break;
+ NOT_REACHED; /* NOTREACHED */
case SVt_REGEXP:
upgregexp:
{
char *ptr = ebuf + sizeof ebuf;
bool tempalt = uv ? alt : FALSE; /* Vectors can't change alt */
+ unsigned dig;
zeros = 0;
switch (base) {
- unsigned dig;
case 16:
p = (char *)((c == 'X') ? PL_hexdigit + 16 : PL_hexdigit);
do {
return varname(gv, '$', 0,
NULL, (I8)obase->op_private, FUV_SUBSCRIPT_ARRAY);
}
- break;
+ NOT_REACHED; /* NOTREACHED */
case OP_EXISTS:
o = cUNOPx(obase)->op_first;
? '@' : '%',
o->op_targ, NULL, 0, FUV_SUBSCRIPT_WITHIN);
}
- break;
+ NOT_REACHED; /* NOTREACHED */
}
case OP_AASSIGN:
goto just_a_word_zero_gv;
}
s++;
+ {
+ OP *attrs;
+
switch (PL_expect) {
- OP *attrs;
case XOPERATOR:
if (!PL_in_my || PL_lex_state != LEX_NORMAL)
break;
}
TOKEN(COLONATTR);
}
+ }
if (!PL_lex_allbrackets && PL_lex_fakeeof >= LEX_FAKEEOF_CLOSING) {
s--;
TOKEN(0);
Perl_croak(aTHX_
"Can't find Unicode property definition \"%"SVf"\"",
SVfARG(retval));
- Perl_croak(aTHX_ "SWASHNEW didn't return an HV ref");
+ NOT_REACHED; /* NOTREACHED */
}
} /* End of calling the module to find the swash */