This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/16887] Bad assignment in "int i=1; i=i++;"
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Aug 2004 14:54:44 -0000
- Subject: [Bug c/16887] Bad assignment in "int i=1; i=i++;"
- References: <20040805140951.16887.krs@home.se>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-08-05 14:54 -------
No, it's not a bug. You can't modify a variable twice in one
expression. That's what you're trying to do, though, with the ++
and the assignment.
Take a look at any of PR 11363, PR 11751, PR 12552, PR 13403,
PR 14417, PR 15012, PR 15103.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16887