From owner-freebsd-hackers Fri Oct 27 14:00:54 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id OAA20602 for hackers-outgoing; Fri, 27 Oct 1995 14:00:54 -0700 Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id OAA20596 for ; Fri, 27 Oct 1995 14:00:49 -0700 Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id NAA23967; Fri, 27 Oct 1995 13:51:26 -0700 From: Terry Lambert Message-Id: <199510272051.NAA23967@phaeton.artisoft.com> Subject: Re: SYSCALL IDEAS [Was: cvs commit: src/sys/kern sysv_msg.c sysv_sem.c sysv_shm.c] To: wollman@lcs.mit.edu (Garrett A. Wollman) Date: Fri, 27 Oct 1995 13:51:26 -0700 (MST) Cc: terry@lambert.org, hackers@FreeBSD.ORG In-Reply-To: <9510272033.AA23654@halloran-eldar.lcs.mit.edu> from "Garrett A. Wollman" at Oct 27, 95 04:33:51 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1315 Sender: owner-hackers@FreeBSD.ORG Precedence: bulk > > But this implies that if there is not a prototype in scope, a function > > that uses a type that is not correct without a prototype in scope should > > not generate a bogus call reference. > > Not at all. IT IS THE CALLER'S RESPONSIBILITY TO PASS THE CORRECT > TYPES AND ALWAYS HAS BEEN. THEN PROTOTYPES SHOULD WARN AND NEVER COERCE. > In particular, it is incorrect to call lseek() with a `where' argument > of any type other than `off_t', and if a prototype is not in scope, > the the programmer damn well better use a cast to ensure that the > correct type is being used. I agree, although I believe definine off_t as quad to be illegal. > > That's an evil way to pass arguments, then. 8-(. > > That's a fast way to pass arguments on a slow architecture. If you > don't like it, tough, because I /know/ that there are compilers out > there that do this, or something nearly like it. (And don't forget > the SPARC, where under Sun's compiler all aggregates are passed by > hidden reference.) Sun is, at least, consistent. You can predict without knowledge of the compiler or the particular call stub implementation what the arguments should be in assembler. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.