On Tue, 17 Oct 2000, Richard Guenther wrote:
> On Tue, 17 Oct 2000, Bernd Schmidt wrote:
> > On Tue, 17 Oct 2000, Richard Guenther wrote:
> > > The following one is wrong, tho - should be rather
> > > str[i] = dn[i]; i++;
> >
> > Nope. (Well, at least you need to add extra braces.) The comma is a
> > sequence point.
>
> Umm, I thought, dn[i], i++ evaluates to i and dn[i++] evaluates
> to dn[i], so it should be either i++, dn[i-1] or the one I showed
> above?
According to operator precedence rules,
str[i] = dn[i], i++;
is equivalent to
(str[i] = dn[i]), i++;
Comma has the lowest precedence of all C operators.
Bernd
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/
- Re: Patch to remove undefined C code Bill Wendling
- Re: Patch to remove undefined C code Raja R Harinath
- Re: Patch to remove undefined C code Richard Henderson
- Re: Patch to remove undefined C code Abramo Bagnara
- Re: Patch to remove undefined C code Bill Wendling
- Re: Patch to remove undefined C code Helge Hafting
- Re: Patch to remove undefined C code Bernd Schmidt
- Re: Patch to remove undefined C code Richard Guenther
- Re: Patch to remove undefined C code Bernd Schmidt
- Re: Patch to remove undefined C code Richard Guenther
- Re: Patch to remove undefined C code Bernd Schmidt
- Re: Patch to remove undefined C code Horst von Brand
- Re: Patch to remove undefined C code Mark Montague
- Re: Patch to remove undefined C code Bill Wendling
- Re: Patch to remove undefined C code Horst von Brand
- Re: Patch to remove undefined C code Bernd Schmidt
- Patch to remove undefined C code Jonathan George
- Re: Patch to remove undefined C code Ben Pfaff
- Re: Patch to remove undefined C code Alexander Viro
- Re: Patch to remove undefined C code Mike Castle
- Re: Patch to remove undefined C code Alexander Viro

