Path: utzoo!attcan!uunet!seismo!ukma!rex!samsung!dali.cs.montana.edu!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: "static" keyword used with function names Message-ID: <13419@smoke.BRL.MIL> Date: 26 Jul 90 19:17:48 GMT References: <79253@cc.utah.edu> Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 16 In article <79253@cc.utah.edu> ORCUTT@cc.utah.edu writes: >static int func(void); /* A declaration */ >... >static int func(void) /* A definition */ >{ >... >} This is fine, so long as both these occur at file scope. A block-scope function declaration must not include the "static" storage-class specifier. If you were to omit the first "static", that "func" would have external linkage (assuming no previous internal-linkage declaration were visible at that point), which is not what you want. (The behavior when the same identifier has been declared in the same scope with both internal and external linkage is undefined, i.e. not something to rely on.)