summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2020-09-06 13:10:02 -0600
committerKarl Williamson <khw@cpan.org>2020-09-09 19:56:34 -0600
commit041c1a236adc7fba9323bf915d40b86b247edf2a (patch)
tree8bb85ba39774e0732548836b140d32fea7753995
parentb440465d5a4b3b04a3503d257418cf65ade0cbdb (diff)
downloadperl-041c1a236adc7fba9323bf915d40b86b247edf2a.tar.gz
Use macro instead of its expansion
We already have a macro that expands to what this code does; it's clearer to use it.
-rw-r--r--gv.h2
-rw-r--r--handy.h2
-rw-r--r--op.h2
-rw-r--r--regexp.h2
-rw-r--r--sv.h8
5 files changed, 8 insertions, 8 deletions
diff --git a/gv.h b/gv.h
index f598586140..36d77450c1 100644
--- a/gv.h
+++ b/gv.h
@@ -26,7 +26,7 @@ struct gp {
#define GvXPVGV(gv) ((XPVGV*)SvANY(gv))
-#if defined (DEBUGGING) && defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) && !defined(__INTEL_COMPILER)
+#if defined (DEBUGGING) && defined(PERL_USE_GCC_BRACE_GROUPS) && !defined(__INTEL_COMPILER)
# define GvGP(gv) \
(0+(*({GV *const _gvgp = (GV *) (gv); \
assert(SvTYPE(_gvgp) == SVt_PVGV || SvTYPE(_gvgp) == SVt_PVLV); \
diff --git a/handy.h b/handy.h
index 37d046844b..1637f463fe 100644
--- a/handy.h
+++ b/handy.h
@@ -93,7 +93,7 @@ already-built-in ones return pointers to what their names indicate.
=cut
*/
-#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
+#if defined(PERL_USE_GCC_BRACE_GROUPS)
# define MUTABLE_PTR(p) ({ void *p_ = (p); p_; })
#else
# define MUTABLE_PTR(p) ((void *) (p))
diff --git a/op.h b/op.h
index 12d359529d..e286f8b304 100644
--- a/op.h
+++ b/op.h
@@ -396,7 +396,7 @@ struct pmop {
#else
# define PmopSTASH(o) \
(((o)->op_pmflags & PMf_ONCE) ? (o)->op_pmstashstartu.op_pmstash : NULL)
-# if defined (DEBUGGING) && defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
+# if defined (DEBUGGING) && defined(PERL_USE_GCC_BRACE_GROUPS)
# define PmopSTASH_set(o,hv) ({ \
assert((o)->op_pmflags & PMf_ONCE); \
((o)->op_pmstashstartu.op_pmstash = (hv)); \
diff --git a/regexp.h b/regexp.h
index 16fddced28..5335061f32 100644
--- a/regexp.h
+++ b/regexp.h
@@ -608,7 +608,7 @@ and check for NULL.
the start pos (so s/.\G// would fail
on second iteration */
-#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
+#if defined(PERL_USE_GCC_BRACE_GROUPS)
# define ReREFCNT_inc(re) \
({ \
/* This is here to generate a casting warning if incorrect. */ \
diff --git a/sv.h b/sv.h
index aae04cda54..19ce718ac3 100644
--- a/sv.h
+++ b/sv.h
@@ -1147,7 +1147,7 @@ object type. Exposed to perl code via Internals::SvREADONLY().
#endif
-#if defined (DEBUGGING) && defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
+#if defined (DEBUGGING) && defined(PERL_USE_GCC_BRACE_GROUPS)
# define SvTAIL(sv) ({ const SV *const _svtail = (const SV *)(sv); \
assert(SvTYPE(_svtail) != SVt_PVAV); \
assert(SvTYPE(_svtail) != SVt_PVHV); \
@@ -1199,7 +1199,7 @@ object type. Exposed to perl code via Internals::SvREADONLY().
# endif
# define SvEND(sv) ((sv)->sv_u.svu_pv + ((XPV*)SvANY(sv))->xpv_cur)
-# if defined (DEBUGGING) && defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
+# if defined (DEBUGGING) && defined(PERL_USE_GCC_BRACE_GROUPS)
/* These get expanded inside other macros that already use a variable _sv */
# define SvPVX(sv) \
(*({ SV *const _svpvx = MUTABLE_SV(sv); \
@@ -1414,7 +1414,7 @@ object type. Exposed to perl code via Internals::SvREADONLY().
# define BmFLAGS(sv) (SvTAIL(sv) ? FBMcf_TAIL : 0)
#endif
-#if defined (DEBUGGING) && defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
+#if defined (DEBUGGING) && defined(PERL_USE_GCC_BRACE_GROUPS)
# define BmUSEFUL(sv) \
(*({ SV *const _bmuseful = MUTABLE_SV(sv); \
assert(SvTYPE(_bmuseful) >= SVt_PVIV); \
@@ -1873,7 +1873,7 @@ Like C<sv_catsv> but doesn't process magic.
? TRUE \
: (fallback))
-#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN)
+#if defined(PERL_USE_GCC_BRACE_GROUPS)
# define SvIVx(sv) ({SV *_sv = MUTABLE_SV(sv); SvIV(_sv); })
# define SvUVx(sv) ({SV *_sv = MUTABLE_SV(sv); SvUV(_sv); })