aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.y
diff options
context:
space:
mode:
Diffstat (limited to 'awkgram.y')
-rw-r--r--awkgram.y10
1 files changed, 8 insertions, 2 deletions
diff --git a/awkgram.y b/awkgram.y
index 4f223797..18530eb1 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -4006,14 +4006,20 @@ retry:
/* allow parameter names to shadow the names of gawk extension built-ins */
if ((tokentab[mid].flags & GAWKX) != 0) {
+ NODE *f;
+
switch (want_param_names) {
case FUNC_HEADER:
/* in header, defining parameter names */
goto out;
case FUNC_BODY:
/* in body, name must be in symbol table for it to be a parameter */
- if (lookup(tokstart) != NULL)
- goto out;
+ if ((f = lookup(tokstart)) != NULL) {
+ if (f->type == Node_builtin_func)
+ break;
+ else
+ goto out;
+ }
/* else
fall through */
case DONT_CHECK: