Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ihlpg!tainter From: tainter@ihlpg.ATT.COM (Tainter) Newsgroups: comp.lang.c Subject: Re: extern Keywords: extern Message-ID: <4694@ihlpg.ATT.COM> Date: 24 Jan 88 04:30:51 GMT References: <17428@topaz.rutgers.edu> <7123@brl-smoke.ARPA> <4405@garfield.UUCP> <7150@brl-smoke.ARPA> Distribution: na Organization: AT&T Bell Laboratories - Naperville, Illinois Lines: 23 In article <7150@brl-smoke.ARPA>, gwyn@brl-smoke.ARPA (Doug Gwyn ) writes: > In article <4405@garfield.UUCP> john13@garfield.UUCP (John Russell) writes: > -file 1 - > int fou; > [I assume "foo" was intended] I assume your assumption also. > -file 2 - > extern int foo; > foo = 1; I assume this last line was supposed to be a static initialization. No C compiler accepts this. If you have something, supposedly a C compiler, that accepts this then you have been lied to. Clearly, that compiler is for some language very similar to C, but not C. > PLEASE don't do this. A compiler is not obliged to make this example > "work". In fact, C compilers should be obliged to complain about this as it does not conform to the syntax of C. --j.a.tainter