This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/57647] lvalue required as increment operand
- From: "schwab at linux-m68k dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 19 Jun 2013 08:38:03 +0000
- Subject: [Bug c/57647] lvalue required as increment operand
- Auto-submitted: auto-generated
- References: <bug-57647-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57647
--- Comment #5 from Andreas Schwab <schwab@linux-m68k.org> ---
((unsigned long*)foo)++ and ((unsigned long *)foo++) are not equivalent
expressions. The former is the same as foo = (char *)((unsigned long*)foo +
1), the latter is foo += sizeof(*foo) (and the cast has no effect).