linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* does static function declaration require static definition?
@ 2005-08-02 19:23 Robert P. J. Day
  2005-08-03  8:04 ` Steve Graegert
  0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2005-08-02 19:23 UTC (permalink / raw)
  To: C programming list


  from my 5th edition of harbison and steele, p. 83, i read that the
"static" storage class specifier on a function "indicates that the
declared function will be defined -- with storage class static --
later in the file."

  doesn't this read that, once you declare the function as static, you
*must* define it as static as well?  gcc doesn't seem to have a
problem with leaving "static" off of the definition.

  of course, gcc certainly complains if you forget the "static" on the
declaration but put it on the definition further down.

rday

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-08-03  8:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-02 19:23 does static function declaration require static definition? Robert P. J. Day
2005-08-03  8:04 ` Steve Graegert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).