From: Robert Hoehne Newsgroups: comp.os.msdos.djgpp Subject: Re: djgpp bug Date: Wed, 28 May 1997 13:03:33 +0200 Organization: TU Chemnitz-Zwickau Message-ID: <338C1105.6097C25A@Mathematik.tu-chemnitz.de> References: NNTP-Posting-Host: pandora.hrz.tu-chemnitz.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 19 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk KOMODakis Nikolaos wrote: > > If you declare the same global (not static) variable in two different C > files, the compiler doesn't tell you anything (not even a warning). > However, it allocates the same space for the two definitions. When gcc compiles one source file, it does nothing now about anything in any other source file. But when you link (NOTE link and not compile) these two files to an executable, then you will get an error. Robert -- ***************************************************************** * Robert Hoehne, Fakultaet fuer Mathematik, TU-Chemnitz-Zwickau * * Post: Am Berg 3, D-09573 Dittmannsdorf * * e-Mail: Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE * * WWW: http://www.tu-chemnitz.de/~rho * *****************************************************************