Re: Unexpected behavior of gcc on pointer dereference & increment

2023-09-01 Thread Paul Koning via Gcc
> On Sep 1, 2023, at 12:35 PM, Tomas Bortoli via Gcc wrote: > > Hi, > > I recently discovered that the following C statement: > > pointer++; > > is semantically equivalent to the following: > > *pointer++; > > Is this due to operators' priority? To me, that looks weird. Yes,

Re: Unexpected behavior of gcc on pointer dereference & increment

2023-09-01 Thread David Edelsohn via Gcc
On Fri, Sep 1, 2023 at 12:37 PM Tomas Bortoli via Gcc wrote: > Hi, > > I recently discovered that the following C statement: > > pointer++; > > is semantically equivalent to the following: > > *pointer++; > > Is this due to operators' priority? To me, that looks weird. > Equivalent in the

Unexpected behavior of gcc on pointer dereference & increment

2023-09-01 Thread Tomas Bortoli via Gcc
Hi, I recently discovered that the following C statement: pointer++; is semantically equivalent to the following: *pointer++; Is this due to operators' priority? To me, that looks weird. Thanks in advance, Tomas