linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Robert P. J. Day" <rpjday@mindspring.com>
To: C programming list <linux-c-programming@vger.kernel.org>
Subject: does static function declaration require static definition?
Date: Tue, 2 Aug 2005 15:23:16 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.63.0508021520360.29602@localhost.localdomain> (raw)


  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

             reply	other threads:[~2005-08-02 19:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-02 19:23 Robert P. J. Day [this message]
2005-08-03  8:04 ` does static function declaration require static definition? Steve Graegert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.63.0508021520360.29602@localhost.localdomain \
    --to=rpjday@mindspring.com \
    --cc=linux-c-programming@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).