zben@umcp-cs.UUCP (09/11/83)
If indeed you would be willing to check number and type of arguments except for the builtins, why not institute a form of declaration that requests the compiler NOT to check for certain functions: PRINTF(?) or something like it. The builtins could be declared in .h files with this attributes, and the facility would be available to any user who specifically requests it for his function...
guy@rlgvax.UUCP (Guy Harris) (09/12/83)
I have heard that C will soon check for type-correctness of arguments to routines (and will perform casts, as necessary). The syntax will probably be something like int stat(int, struct stat *); The way that routines such as "printf" are handled is that if you don't declare what arguments a routine takes, it assumes that you're being "old- fashioned" and will allow any arguments and will do no type-checking or casting; this also makes the new language compatible with the old one. Simple fix. Guy Harris {seismo,mcnc,we13,brl-bmd,allegra}!rlgvax!guy
alan@allegra.UUCP (09/15/83)
My only suggestion would be that ... this need not and should not be done by the compiler ... I think you missed an important point. The compiler, armed with this information, would be able to coerce arguments to the correct type. This would make it possible to say f(1); without knowing or caring whether f is expecting an int, a short, or a long. In this way, the programmer would be relieved of a tedious responsibility, and a potential source of errors. Alan Driscoll Bell Labs, Murray Hill
himel@cadvax.UUCP (09/29/83)
Relay-Version: version B 2.10 5/3/83; site houti.UUCP Posting-Version: version B 2.10.1 6/24/83; site cadvax Message-ID: <141@cadvax> Date: Wed, 28-Sep-83 20:04:52 EDT checking alk is that the unfortunate truth is some routines depend on the fact that type checking is not done (e.g. printf). Organization: Megatest Corp., Santa Clara, CA Lines: 3 Mark Himelstein