aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cppawk.122
1 files changed, 22 insertions, 0 deletions
diff --git a/cppawk.1 b/cppawk.1
index bbf7b0c..5004943 100644
--- a/cppawk.1
+++ b/cppawk.1
@@ -303,6 +303,28 @@ and
.B --prepro
command line options.
+The C preprocessor doesn't permit macro recursion, which introduces
+limitations to the ability to compose invocations of
+.B cppawk
+macros, thus curtailing their power.
+If in the expansion of
+some macro
+.B M
+a call of macro
+.B M
+appears, that call is not expanded. This is relied upon by C programs which
+use macros to inline same-named functions, for instance, if it were
+acceptable for the argument of
+.B strlen
+to be evaluated twice, then this macro version would be permissible:
+.ft B
+ #define strlen(x) (*(x) == 0 ? 0 : strlen(x))
+.ft R
+Here, the
+.B strlen
+call in the macro expansion is relied upon not to be expanded as a macro,
+in which case runaway expansion would occur.
+
.SH AUTHOR
Kaz Kylheku <kaz@kylheku.com>