public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: Songtao Chen <songtao@cisco.com>
To: Zack Weinberg <zack@codesourcery.com>, Neil Booth <neil@daikokuya.co.uk>
Cc: gcc-bugs@gcc.gnu.org
Subject: Re: Is this a bug?
Date: Mon, 13 Jan 2003 05:17:00 -0000	[thread overview]
Message-ID: <4.3.2.7.2.20030106094044.01d13dd8@toque.cisco.com> (raw)
In-Reply-To: <87k7hkxebd.fsf@egil.codesourcery.com>

Hi Zack and Neil,

Thank you very much for the explanation.

Songtao

At 11:09 PM 1/4/2003 -0800, Zack Weinberg wrote:
>Songtao Chen <songtao@cisco.com> writes:
>
> >     i = ++i % 2;
> >     i = i++ % 2;
>
>Both of these are invalid C - you can't modify i twice in the same
>statement (a slight simplification, which will do).
>
>Write instead
>
>       i = (i+1) % 2;
>
>to get the behavior you wanted.
>
>zw


  reply	other threads:[~2003-01-06 14:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-02 21:21 Songtao Chen
2003-01-02 21:24 ` Neil Booth
2003-01-02 21:42   ` Songtao Chen
2003-01-02 21:46     ` Neil Booth
2003-01-02 23:00       ` Songtao Chen
2003-01-13  5:17         ` Zack Weinberg
2003-01-13  5:17           ` Songtao Chen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-08-21  9:23 Lev Assinovsky
2003-02-06 21:33 Matthew Toseland
2003-02-06 22:18 ` Falk Hueffner
2002-08-30  2:41 Ritzert
2002-09-03 14:07 ` Matt Austern
2002-09-10  1:06   ` Michael Ritzert
2000-12-06  3:42 Martin Kahlert
2000-01-30 16:44 Kuo Yu Chuang
     [not found] <007d01bf6988$d2fb0c40$795d608c@ccl.itri.org.tw>
2000-01-30  2:45 ` Martin v. Loewis
1999-05-11 21:09 Christian II
1999-05-11 23:44 ` Martin v. Loewis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4.3.2.7.2.20030106094044.01d13dd8@toque.cisco.com \
    --to=songtao@cisco.com \
    --cc=gcc-bugs@gcc.gnu.org \
    --cc=neil@daikokuya.co.uk \
    --cc=zack@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).