c/2904: printf changes order
Phil Edwards
pedwards@disaster.jaj.com
Tue May 22 16:16:00 GMT 2001
The following reply was made to PR c/2904; it has been noted by GNATS.
From: Phil Edwards <pedwards@disaster.jaj.com>
To: guedem@uni-freiburg.de
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c/2904: printf changes order
Date: Tue, 22 May 2001 17:56:43 -0400
On Tue, May 22, 2001 at 08:51:36PM -0000, guedem@uni-freiburg.de wrote:
> printf("%d, %d, %d\n", *iPtr++, *iPtr++, *iPtr++);
You are changing a variable more than once within the same statement. The
result is undefined behavior. Not a compiler bug.
--
pedwards at disaster dot jaj dot com | pme at sources dot redhat dot com
devphil at several other less interesting addresses in various dot domains
The gods do not protect fools. Fools are protected by more capable fools.
More information about the Gcc-prs
mailing list