https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57647
Marek Polacek changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57647
--- Comment #8 from Andreas Schwab ---
Postfix operators bind stronger than cast operators. If you need help on the C
language then bugzilla is not the right place.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57647
--- Comment #7 from vijay Nag ---
(In reply to vijay Nag from comment #6)
> (In reply to Andreas Schwab from comment #5)
> > ((unsigned long*)foo)++ and ((unsigned long *)foo++) are not equivalent
> > expressions. The former is the same as foo =
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57647
--- Comment #6 from vijay Nag ---
(In reply to Andreas Schwab from comment #5)
> ((unsigned long*)foo)++ and ((unsigned long *)foo++) are not equivalent
> expressions. The former is the same as foo = (char *)((unsigned long*)foo +
> 1), the latte
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57647
--- Comment #5 from Andreas Schwab ---
((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
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57647
--- Comment #4 from vijay Nag ---
(In reply to Marek Polacek from comment #3)
> It should work for any type, but, why don't you do only foo++;, i.e. drop
> the cast? In that case there shouldn't be value computed is not used
> warning.
Pointer A
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57647
--- Comment #3 from Marek Polacek ---
It should work for any type, but, why don't you do only foo++;, i.e. drop the
cast? In that case there shouldn't be value computed is not used warning.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57647
--- Comment #2 from vijay Nag ---
(In reply to Marek Polacek from comment #1)
> While 4.7 issues warning: value computed is not used, 4.8 and 4.9 do not for
> int
> main ()
> {
> char bar = 4;
> char *foo = &bar;
> (unsigned long *)foo++;
>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57647
Marek Polacek changed:
What|Removed |Added
CC||mpolacek at gcc dot gnu.org
--- Comment #