Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Jul 1995 14:43:23 -0500
From:      Peter da Silva <peter@bonkers.taronga.com>
To:        hackers@freebsd.org
Subject:   Re: make weirdness
Message-ID:  <199507231943.OAA00535@bonkers.taronga.com>
References:  <199507131123.EAA05266@silvia.hip.berkeley.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <199507131123.EAA05266@silvia.hip.berkeley.edu>,
Satoshi Asami <asami@cs.berkeley.edu> wrote:
> * ....and overlooked that it was not quite correct shell syntax (do should not
> * be followed by a semicolon). I wonder why the old make let it pass though.

>So, why didn't the old sh complain?  Of course I dunno.

The old sh didn't complain because an empty statement is a perfectly valid
statement. I did some checking: it looks like complaining about this syntax
is a System-V-ism. IMHO ignoring empty statements is the right thing to do,
from a language perspective.

1.1.5.1:
$ ; ; ; ; ;
$

BSDI:
$ ; ; ; ; ;
$

2.0.5 (freefall):
$ ; ; ; ; ;
Syntax error: ";" unexpected

OSF/1 (Digital UNIX):
$ ; ; ; ; ;
$ 

SunOS 4.1.3:
$ ; ; ; ; ;
syntax error: `newline or ;' unexpected

Solaris:
$ ; ; ; ; ;
syntax error: `newline or ;' unexpected

SVR3:
$ ; ; ; ; ;
syntax error: `newline or ;' unexpected

SVR4:
# ; ; ; ; ;
syntax error: `newline or ;' unexpected



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199507231943.OAA00535>