Quoth Oleg Goldshmidt on Tue, Mar 25, 2003:
> Mark Veltzer <[EMAIL PROTECTED]> writes:
> 
> > > If i am not mistaken - this in not so in ANSI C [i might be mistaken...
> > > the ritchie&ker. book is not so clear about this point]
> 
> It gives a warning about shadowing. I don't know what the standard
> says about it. For all I know, it may be implementation-dependent or 
> undefined. Don't do it.

I'm *definitely* not a language lawyer, but I looked at the draft
http://std.dkuug.dk/JTC1/SC22/WG14/www/docs/n843.htm
and it seems to me that shadowing is legal.  In any case, *if*
such construct is legal, *then* shadowing must work.

> > > how compliant is gcc with ansi?
> 
> Very.

C99?

> In any case, I strongly suggest you avoid things like this in your
> code.

Seconded.  Whether it's legal or not, it's confusing, and
therefore not advised.

Vadik.

-- 
There is hopeful symbolism in the fact that flags do not wave in a
vacuum.
                -- Arthur C. Clarke

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to