From owner-freebsd-hackers Sat Apr 15 12:11:27 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id MAA21187 for hackers-outgoing; Sat, 15 Apr 1995 12:11:27 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id MAA21180 for ; Sat, 15 Apr 1995 12:11:18 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id EAA32482; Sun, 16 Apr 1995 04:53:56 +1000 Date: Sun, 16 Apr 1995 04:53:56 +1000 From: Bruce Evans Message-Id: <199504151853.EAA32482@godzilla.zeta.org.au> To: freebsd-hackers@FreeBSD.org, j@uriah.heep.sax.de Subject: Re: 90's compilers Sender: hackers-owner@FreeBSD.org Precedence: bulk >> If you're proposing changing the coding guidelines away from KNF >> on this I'm all for it. >There has never been an `official' coding guideline to keep KNF. In >fact, some device drivers under i386/isa do already fully use `new' >style. These drivers demonstrate that there is no `official' coding style, not that there shouldn't be one. >The boot code has been crying for a revamp. The writers didn't even >bother to declare external functions at all (``all the world is an >int, and might take any possible number of arguments'' :). There have >been many errors in the code (functions that actually take a `char' >argument, while the compiler promoted it to `int' -- works only since >we're little-endian). >This style made it highly error-prone. Actually the functions took an `int' arg and demoted it to a `char'. This is perfectly valid K&R1 and ANSI code. Declaring the functions as taking a `char' arg changes the interface are requires prototypes to be in scope when the functions are called. Bruce