P. 1
C Language Reference Manual - 5th Edition

C Language Reference Manual - 5th Edition

4.5

|Views: 8,346|Likes:
Published by ioana

More info:

Published by: ioana on May 23, 2009
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

07/16/2013

pdf

text

original

There can be more than one external definition for the identifier of an object,
with or without the explicit use of the keyword
extern. If the definitions
disagree, or more than one is initialized, the behavior is undefined (3.7.2).

With ANSI C, only one external definition of the object is permitted. If more than
one is present, the linker (ld(1)) gives a warning message. The Strict Ref/Def
model is followed (ANSI C Rationale, 3.1.2.2, page 23).

With cc -cckr, the Relaxed Ref/Def model is followed (ANSI C Rationale,
3.1.2.2, page 23): multiple definitions of the same identifier of an object in different
files are accepted and all but one of the definitions are treated (silently) as if they
had the extern keyword.

If the definitions in different source units disagree, the mismatch is not currently
detected by the linker (ld), and the resulting program will probably not work
correctly.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->