summaryrefslogtreecommitdiff
path: root/XSUB.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-06-13 01:05:28 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-06-13 01:05:28 +0000
commitf022b9987cfef8a7e7c7c892f22c2e71c583bfc7 (patch)
tree393b2f0f6925a3978e1e0a6d3974d31c8cbf275d /XSUB.h
parent92731555bc557e609a4a3d41cae3427488548829 (diff)
downloadperl-f022b9987cfef8a7e7c7c892f22c2e71c583bfc7.tar.gz
Use __attribute__((unused)) to silence -Wall on unused ax.
p4raw-id: //depot/perl@10549
Diffstat (limited to 'XSUB.h')
-rw-r--r--XSUB.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/XSUB.h b/XSUB.h
index cfcad5d595..13c5ea9f37 100644
--- a/XSUB.h
+++ b/XSUB.h
@@ -53,9 +53,12 @@ handled automatically by C<xsubpp>.
# define XS(name) void name(pTHXo_ CV* cv)
#endif
+/* gcc -Wall: if an xsub has no arguments and PPCODE is used
+ * and none of ST, XSRETURN or XSprePUSH macros are used
+ * then `ax' (setup by dXSARGS) is unused. */
#define dXSARGS \
dSP; dMARK; \
- I32 ax = mark - PL_stack_base + 1; \
+ I32 ax __attribute__((unused)) = mark - PL_stack_base + 1; \
I32 items = sp - mark
#define dXSTARG SV * targ = ((PL_op->op_private & OPpENTERSUB_HASTARG) \