X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f Message-ID: <41127AF9.26DEA37C@yahoo.com> From: CBFalconer Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.c,comp.os.msdos.djgpp Subject: Re: Environment Variables References: <41115A5F DOT 7DDC6318 AT yahoo DOT com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 36 Date: Thu, 05 Aug 2004 18:43:16 GMT NNTP-Posting-Host: 12.76.139.216 X-Complaints-To: abuse AT worldnet DOT att DOT net X-Trace: bgtnsc05-news.ops.worldnet.att.net 1091731396 12.76.139.216 (Thu, 05 Aug 2004 18:43:16 GMT) NNTP-Posting-Date: Thu, 05 Aug 2004 18:43:16 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Ralmin wrote: > > I thought of it another way... take for example this program: > > #include > > int environ; > > int main(void) > { > printf("%d\n", environ); > return 0; > } > > According to the standard, the above contains a definition of the > variable environ, with external linkage and static storage, right? > It should be therefore be initialised to zero. I agree with you, provided you use -ansi -pedantic. That prints a non-zero value here under DJGPP 2.03 and gcc 3.2.1. Since you have the problem under cygwin (I believe) and it doesn't appear to be system library/header specific, I suggest YOU file a bug report with gnu. "info gcc bugs" or "gcc --help" will tell you how to file. I am cross-posting this to comp.os.msdos.djgpp. -- "I'm a war president. I make decisions here in the Oval Office in foreign policy matters with war on my mind." - Bush. "Churchill and Bush can both be considered wartime leaders, just as Secretariat and Mr Ed were both horses." - James Rhodes. "If I knew then what I know today, I would still have invaded Iraq. It was the right decision" - G.W. Bush, 2004-08-02