static functions broken in non-Unix compilers?

John F. Haugh II haugj at pigs.UUCP
Sat May 21 01:10:22 AEST 1988


In article <120 at pigs.UUCP>, I write:
] I have been informed that there is some trouble declaring functions to
] be static in most of the non-Unix compilers.  I haven't seen this but
] my informant swears the 9370 VM and VAX/VMS and MS-DOS C compilers all
] gag on static func().
] 
] Comments?  Send mail, if I get enough replies I'll summarize to the net.

No one else has noticed this on MS-DOS or VMS compilers so I suspect the
trouble is with the compiler on the 9370.  (The VM compiler, not the
370/IX version.)  The code in question is mutually recursive and looks
something like:

static	int	func1 ()
{
	int	func2 ();

	...
}

static	int	func2 ()
{
	int	func1 ();

	...
}

>From what I've been told, upon seeing `func2' in `static int func2' the
compiler spits out an error message regarding func2.

Is this some new feature of ANSI C?  Does the declaration have to be
of the same form, including storage class???

- John.
-- 
 The Beach Bum                                 Big "D" Home for Wayward Hackers
 UUCP: ...!killer!rpp386!jfh                            jfh at rpp386.uucp :DOMAIN

 "You are in a twisty little maze of UUCP connections, all alike" -- fortune



More information about the Comp.lang.c mailing list