From 21d591dbd87cfa6938c7fec87648835998efdec1 Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Tue, 23 Mar 2021 19:58:43 +0000 Subject: [PATCH] parse.c: rm overlooked SHOPT_BASH stuff (re: 921bbcae) That bit of code supported bash's redundant 'function foo()' function declaration syntax (with both the 'function' keyword and the '()') which is a syntax error on ksh, as it should be. --- src/cmd/ksh93/sh/parse.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/cmd/ksh93/sh/parse.c b/src/cmd/ksh93/sh/parse.c index ffaa9b627..c4f13e87f 100644 --- a/src/cmd/ksh93/sh/parse.c +++ b/src/cmd/ksh93/sh/parse.c @@ -782,18 +782,7 @@ static Shnode_t *funct(Lex_t *lexp) lexp->current = kiaentity(lexp,t->funct.functnam,-1,'p',-1,-1,lexp->script,'p',0,""); #endif /* SHOPT_KIA */ if(flag) - { lexp->token = sh_lex(lexp); -#if SHOPT_BASH - if(lexp->token == LPAREN) - { - if((lexp->token = sh_lex(lexp)) == RPAREN) - t->funct.functtyp |= FPOSIX; - else - sh_syntax(lexp); - } -#endif - } if(t->funct.functtyp&FPOSIX) skipnl(lexp,0); else