C standard

jbn at wdl1.UUCP jbn at wdl1.UUCP
Wed Jul 11 08:01:09 AEST 1984


s easily processable by user programs), so the
	ANSI experience with FORTRAN is not relevant.  It is also possible
	to generate better code when the compiler has the argument types
	at call time (one need not expand chars to ints, for example, an
	expensive operation on machines with 32-bit ints and 16-bit data
	paths).

	C is probably the last language designed which doesn't provide
	means to check calls against definitions.  Correcting this will
	improve the reliability of C programs greatly.

   --   Procedures with variable numbers of arguments still are ill-handled.
	Something akin to the argc/argv mechanism is probably better than
	allowing ommitted arguments.  If we insist that the compiler know
	when it is calling a procedure with a variable number of arguments,
	the serious problems involved when the passing of arguments differs
	by type will be managable.  If variable argument functions were
	called with an arg count and a list of pointers to arguments,
	one could write "printf" in C and know it would be portable.
	There is a pointer type issue here, but we could require that
	everything be passed as the most general pointer type, and that
	formally the type of the argument vector is an array of unions
	of all the pointer types involved.  This could even be checked
	at compile time.

Other than these items, things look good.



More information about the Comp.lang.c mailing list