Article View: comp.lang.c.moderated
Article #2104"extern" and function declarations
From: Carl Laurence Gonsalves
Date: Thu, 29 Feb 1996 00:31
Date: Thu, 29 Feb 1996 00:31
18 lines
1171 bytes
1171 bytes
Is there any difference in the meaning between the following two
declarations?
extern int foo( void );
int foo( void );
In other words, is "extern" ever necessary before a function prototype?
I've never used "extern" for function declarations before, and recently
I've seen some code which uses extern in front of the prototypes in the
headers. I'm wondering, is it okay to leave out extern, or is there a
possibility that some compiler/linker will have problems if I leave it
out?
--
Carl Laurence Gonsalves - clgonsal@undergrad.math.uwaterloo.ca
Computer Science, University of Waterloo
http://www.undergrad.math.uwaterloo.ca/~clgonsal/
http://www.csclub.uwaterloo.ca/~clgonsal/
Technical Details
Message-ID:
<4h2s5p$ok@solutions.solon.com>Path:
arc1-ca.pugleaf.net!solon.com!not-for-mailShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!solon.com!not-for-mail From: clgonsal@undergrad.math.uwaterloo.ca (Carl Laurence Gonsalves) Newsgroups: comp.lang.c.moderated Subject: "extern" and function declarations Date: 28 Feb 1996 18:31:53 -0600 Organization: University of Waterloo Sender: clc@solutions.solon.com Approved: clc@solutions.solon.com Message-ID: <4h2s5p$ok@solutions.solon.com> NNTP-Posting-Host: solutions.solon.com