Date: Sun, 24 Oct 2010 22:03:21 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/bin/sh parser.c src/tools/regression/bin/sh/execution func3.0 Message-ID: <201010242204.o9OM4ctl034763@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
jilles 2010-10-24 22:03:21 UTC
FreeBSD src repository
Modified files:
bin/sh parser.c
Added files:
tools/regression/bin/sh/execution func3.0
Log:
SVN rev 214304 on 2010-10-24 22:03:21Z by jilles
sh: Do not allow overriding a special builtin with a function.
This is a syntax error.
POSIX does not say explicitly whether defining a function with the same name
as a special builtin is allowed, but it does say that it is impossible to
call such a function.
A special builtin can still be overridden with an alias.
This commit is part of a set of changes that will ensure that when
something looks like a special builtin to the parser, it is one. (Not the
other way around, as it remains possible to call a special builtin named
by a variable or other substitution.)
Exp-run done by: pav (with some other sh(1) changes)
Revision Changes Path
1.91 +5 -0 src/bin/sh/parser.c
1.1 +7 -0 src/tools/regression/bin/sh/execution/func3.0 (new)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201010242204.o9OM4ctl034763>
