[comp.std.c] What is a prototype compatible with?

norvell@csri.toronto.edu (Theodore Stevens Norvell) (12/19/88)

Is the following program legal in (proposed) ansi C?

file 1
+-------------------------+
| extern int foo( )       |
| main( )                 |
| { foo( 12 ) ; }         |
+-------------------------+

file 2
+-------------------------+
| foo( int i )            |
| { }                     |
+-------------------------+

I am asking because I need to know if it is possible (reasonable is
another issue) to use different parameter passing conventions for
functions declared with vs. without prototypes.

For example, on a machine like the 68000, one might wish to pass pointers
in address registers and other things in data registers.  But as this scheme
would break a number of existing programs, one might only do so when a
prototype is present.  By the way, would it break any programs that are
conforming?

I'm fairly sure that the above program is legal, but I can't find anywhere
in the (proposed) standard where it says so.  What section should I look at?
The question should boil down to whether the type
	"function with no parameter information returning int"
is compatible with the type
	"function taking int and returning".

Thanks in advance.
Theo Norvell

norvell%csri.toronto.edu
{decvax, utzoo, ... }!utcsri!norvell