Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Apr 1995 04:53:56 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        freebsd-hackers@FreeBSD.org, j@uriah.heep.sax.de
Subject:   Re: 90's compilers
Message-ID:  <199504151853.EAA32482@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> 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



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