Mail Archives: djgpp/2004/08/06/06:01:44
Eli Zaretskii wrote:
>
> > From: CBFalconer <cbfalconer AT yahoo DOT com>
> > Newsgroups: comp.lang.c,comp.os.msdos.djgpp
> > Date: Thu, 05 Aug 2004 23:27:28 GMT
> >
> > Changing the 'environ' name makes things become correct. gcc
> > seems to be creating a parameter to main, which is being accessed
> > by the identifier environ, even though the parameters are
> > specified to be void. gcc -E creates no reference to 'environ'.
>
> `environ' is a symbol that comes from the library. It is a pointer to
> an array of char *, where each array element is a string of the form
> "foo=bar": these are the environment variables and their values.
>
> I guess if this happens even under "-ansi -pedantic", it's a bug that
> we pollute the ANSI namespace with a non-ANSI symbol that doesn't bgin
> with an underscore. But given that Unix programs expect that symbol,
> I'm not sure we can change that.
>
> If you want to discuss possible solutions, please take this to
> djgpp-workers AT delorie DOT com.
Since it seems to appear on Cygwin also it is not peculiar to
DJGPP. I just wanted the DJGPP group to be aware of the bug. I
should have set followups on that post, to avoid all the other
fooferaw.
--
"The most amazing achievement of the computer software industry
is its continuing cancellation of the steady and staggering
gains made by the computer hardware industry..." - Petroski
- Raw text -