This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: pointer post-incr problem with GCC 3.3.3 ??
- From: Andreas Schwab <schwab at suse dot de>
- To: Falk Hueffner <hueffner at informatik dot uni-tuebingen dot de>
- Cc: Graham Stott <graham dot stott at btinternet dot com>,Ron Flory <ron dot flory at adtran dot com>, gcc-bugs at gcc dot gnu dot org,"Ron Flory, Home" <rjflory at mchsi dot com>
- Date: Fri, 18 Jun 2004 16:44:03 +0200
- Subject: Re: pointer post-incr problem with GCC 3.3.3 ??
- References: <20040618141140.64755.qmail@web86108.mail.ukl.yahoo.com><87r7sdlzet.fsf@informatik.uni-tuebingen.de>
Falk Hueffner <hueffner@informatik.uni-tuebingen.de> writes:
> Graham Stott <graham.stott@btinternet.com> writes:
>
>>> *(ptr++) = toupper(*ptr);
>>>
>>> I would assert these two code frags are functionally identical.
>>>
>> Nope your assertion is wrong.
>>
>> Read up on "sequence points" and you'll undersrand why.
>
> I don't see this. Can you please explain in detail where the violation
> is?
Order of evaluation of operator arguments is unspecified, as well as the
exact point (before the next sequence point) when side effects take place.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Maxfeldstraße 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."