C function parameters

gwyn at BRL-VLD.ARPA gwyn at BRL-VLD.ARPA
Sat Jul 28 23:08:02 AEST 1984


From:      Doug Gwyn (VLD/VMB) <gwyn at BRL-VLD.ARPA>

I think I may have a way for C to evolve into complete declaration
of parameters of functions without the ANSI standard breaking
existing code or promising support "forever" for unspecified
parameter lists.  As I understand the current state of the C
language draft standard, there is supposed to be an appendix
in which common extensions to the language (such as labeled-
common model for extern data, "asm" keyword, etc.) are to be
described in order to standardize the way in which extensions
are provided.  However, a standard-conforming compiler will
not have to implement ANY of the officially-blessed extensions.
Now, it seems that the best solution to this problem of backward-
compatibility of omitted function parameters is to bless that
usage IN THE EXTENSIONS APPENDIX, with the preferred full use
of parameters (your option #3 in the note posted to net.lang.c)
the only method provided in the main specifications.  That way,
C compiler implementers are free to drop their support for
missing parameters at some future date, and everyone who wants
to write standard-conforming code will HAVE to conform to the
full-declaration model.

I sincerely hope that future C system releases will include a
standard #include file (maybe <library.h>) containing full
declarations for all user-callable functions in the C library.
That would make converting to the new function declaration
style relatively easy (just #include the declarations and
delete any old-style declarations).



More information about the Comp.lang.c mailing list