This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/57647] lvalue required as increment operand


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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]