diff options
author | Nicholas Clark <nick@ccl4.org> | 2011-04-26 11:02:45 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2011-05-18 19:11:03 +0100 |
commit | 75f63940310204509f2935729c2b989e3be7c00d (patch) | |
tree | 4da30ce68217ea31dd520fafb4ddcaf5a333d6b7 /proto.h | |
parent | e72ec78c220651d4143e9b3398dd951c602d880e (diff) | |
download | perl-75f63940310204509f2935729c2b989e3be7c00d.tar.gz |
S_doparseform() should return void, not OP*, as it should use Perl_die not DIE
a1b950687051c32e added an error condition in S_doparseform() but used DIE(...)
to report it. DIE is defined as C<return Perl_die>, which acts as a hint to the
compiler about the control flow [as Perl_die() never returns], but also forces
the return type to be OP *. Whilst this is appropriate for pp functions, it's
not for S_doparseform() - a1b950687051c32e had to change the return type to OP*
and return NULL, just to appease DIE(). Hence use Perl_die() instead, remove
return statements, and remove the didn't-return-NULL (dead) code from
pp_formline.
Diffstat (limited to 'proto.h')
-rw-r--r-- | proto.h | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -5710,8 +5710,7 @@ STATIC OP* S_dofindlabel(pTHX_ OP *o, const char *label, OP **opstack, OP **opli #define PERL_ARGS_ASSERT_DOFINDLABEL \ assert(o); assert(label); assert(opstack); assert(oplimit) -STATIC OP* S_doparseform(pTHX_ SV *sv) - __attribute__warn_unused_result__ +STATIC void S_doparseform(pTHX_ SV *sv) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_DOPARSEFORM \ assert(sv) |