In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/8e565cc84ae4d44bb5f668d4482a9b1eb733ebd4?hp=c6b8d200a892fd82c4dcf22caa543879e763f5ed>

- Log -----------------------------------------------------------------
commit 8e565cc84ae4d44bb5f668d4482a9b1eb733ebd4
Author: Lukas Mai <l....@web.de>
Date:   Tue Jun 20 22:44:16 2017 +0200

    give Renee his "r" bäck

M       pod/perlhist.pod

commit 9626630a64b0987a88ed571b009426cf8aa1a637
Author: Lukas Mai <l....@web.de>
Date:   Tue Jun 20 21:44:29 2017 +0200

    wrap multi-statement macros in STMT_START/STMT_END
    
    With the original code you'd have to be very, very careful:
    
      if (foo)
          CLEAR_POSIX_WARNINGS_AND_RETURN(42);
    
    would have expanded to
    
      if (foo)
          CLEAR_POSIX_WARNINGS();
      return 42;  /* always returns! */

M       regcomp.c
-----------------------------------------------------------------------

Summary of changes:
 pod/perlhist.pod |  2 +-
 regcomp.c        | 12 ++++++++----
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/pod/perlhist.pod b/pod/perlhist.pod
index f301e4dc39..369caebbd0 100644
--- a/pod/perlhist.pod
+++ b/pod/perlhist.pod
@@ -33,7 +33,7 @@ Matt S Trout, David Golden, Florian Ragwitz, Tatsuhiko 
Miyagawa,
 Chris C<BinGOs> Williams, Zefram, Ævar Arnfjörð Bjarmason, Stevan
 Little, Dave Rolsky, Max Maischein, Abigail, Jesse Luehrs, Tony Cook,
 Dominic Hargreaves, Aaron Crane, Aristotle Pagaltzis, Matthew Horsfall,
-Peter Martini, Sawyer X, Chad 'Exodist' Granum, Renee Bäcke,
+Peter Martini, Sawyer X, Chad 'Exodist' Granum, Renee Bäcker,
 and Eric Herman.
 
 =head2 PUMPKIN?
diff --git a/regcomp.c b/regcomp.c
index 0a4ea78693..3f81daa136 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -13992,12 +13992,16 @@ S_populate_ANYOF_from_invlist(pTHX_ regnode *node, 
SV** invlist_ptr)
         }                                                                   \
     } STMT_END
 #define CLEAR_POSIX_WARNINGS()                                              \
-    if (posix_warnings && RExC_warn_text)                                   \
-        av_clear(RExC_warn_text)
+    STMT_START {                                                            \
+        if (posix_warnings && RExC_warn_text)                               \
+            av_clear(RExC_warn_text);                                       \
+    } STMT_END
 
 #define CLEAR_POSIX_WARNINGS_AND_RETURN(ret)                                \
-    CLEAR_POSIX_WARNINGS();                                                 \
-    return ret
+    STMT_START {                                                            \
+        CLEAR_POSIX_WARNINGS();                                             \
+        return ret;                                                         \
+    } STMT_END
 
 STATIC int
 S_handle_possible_posix(pTHX_ RExC_state_t *pRExC_state,

--
Perl5 Master Repository

Reply via email to