static functions broken in non-Unix compilers?

Doug Gwyn gwyn at brl-smoke.ARPA
Sun May 22 01:06:30 AEST 1988


In article <126 at pigs.UUCP> haugj at pigs.UUCP (John F. Haugh II) writes:
>Is this some new feature of ANSI C?  Does the declaration have to be
>of the same form, including storage class???

Existing compilers were not consistent in their interpretation of linkage
rules.  The correct way (old and new) to forward-reference a static
function is:
	static int func2();
	func1() { /* use func2 here */ }
	static int func2() { }



More information about the Comp.lang.c mailing list