Subject: Re: C Language Standard(s)
To: None <current-users@NetBSD.ORG>
From: Tobias Weingartner <weingart@austin.BrandonU.CA>
Date: 01/10/1996 08:19:51
> but how *else* do you do this correctly, for it to work with both
> k&r compilers and "strict ansi" ones ?
> i know it's ugly, but, i know of no other way to get the benefits
> of prototypes while still allowing the code to compile with non-ansi
> compilers (which some code that i maintain requires).
Is that NetBSD code (kernel/userland), or your own code? I don't see
the problem if you have to maintain your own code, as gcc and most any
C compiler (well, unix C compilers), will eat K&R C code for breakfast.
However, the following should make it quite abundently *CLEAR* that we
need to use either lint, or ANSI-C. Nuff said.
> To: email@example.com
> From: Daniel Hagerty <firstname.lastname@example.org>
> Subject: port-hp300/1918: mis-declaration of hilqfree in hil.c
> >Number: 1918
> >Category: port-hp300
> >Synopsis: mis-declaration of hilqfree in hil.c
> hilqfree from arch/hp300/dev/hil.c is not declared
> properly. The argument 'p' doesn't have a declaration and is assummed
> int. This doesn't show up in kernel's that don't have DEBUG set.
> This patch should fix it.
> diff -c -r18.104.22.168 hil.c
> *** hil.c 1995/12/13 13:26:49 22.214.171.124
> --- hil.c 1996/01/09 08:27:04
> *** 1012,1017 ****
> --- 1012,1018 ----
> hilqfree(hilp, qnum, p)
> register struct hil_softc *hilp;
> register int qnum;
> + struct proc *p;
> #ifdef DEBUG