Sujet : Re: question about linker
De : ben (at) *nospam* bsb.me.uk (Ben Bacarisse)
Groupes : comp.lang.cDate : 08. Dec 2024, 00:13:38
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <87msh7xf19.fsf@bsb.me.uk>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Gnus/5.13 (Gnus v5.13)
Bart <
bc@freeuk.com> writes:
On 07/12/2024 21:00, David Brown wrote:
>
<snip purely subjective opinion on unrealistic code>
>
You mean that /real/ example where a function needed a type written 6 times
instead of once? OK.
I've always wondered why prototypes in C did not simply use the existing
syntax for declarations. After all, it was right there in K&R C, just
outside the parentheses:
f(m, n, s)
int m, n;
char *s;
{ ... }
could have become
f(int m, n; char *s)
{ ... }
rather than
f(int m, int n, char *s)
{ ... }
Does anyone know if there even /was/ a reason?
OK, I know the declarations were not /always/ there. Implicit int meant
that one could write
f(m, n, s)
char *s;
{ ... }
but that could also have been preserved by allowing
f(m, n; char *s)
{ ... }
-- Ben.