On Mon, 23 Aug 2010 23:58:50 +0200, Jilles Tjoelker <jil...@stack.nl> wrote: [.....] > > > ============================================================================== > > > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > > > +++ head/tools/regression/bin/sh/builtins/break3.0 Sun Aug 22 > > > 11:04:30 2010 (r211609) > > > @@ -0,0 +1,15 @@ > > > +# $FreeBSD$ > > > + > > > +# We accept this and people might rely on it. > > > +# However, various other shells do not accept it. > > > + > > > +f() { > > > + break > > > + echo bad1 > > > +} > > > + > > > +while :; do > > > + f > > > + echo bad2 > > > + exit 2 > > > +done [.....] > > Having said that, this behaviour is the same in bash except that bash > > will complain if it's asked to break when the context is wrong, > > perhaps we should complain too? [.....] > Warning messages to stderr mostly get lost in the noise, I don't really > like them. I do not expect people to test for failure of break and > continue, and bash even sets $? to 0 despite printing a warning. If this > error is so important as to need an error message I think should abort > the shell as well (via error(), so that "command break" will avoid > aborting). > > Furthermore note that bash disables these warnings in POSIX mode. [.....]
I agree then, no error seems like the right thing to do. Thanks. -- Brian Somers <br...@awfulhak.org> Don't _EVER_ lose your sense of humour ! <br...@freebsd.org> _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"