Subject: Re: CVS commit: src/sys/arch/ia64/ia64
To: None <source-changes@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: source-changes
Date: 09/02/2006 12:10:36
On Sat, 02 Sep 2006, David Laight wrote:
> On Fri, Sep 01, 2006 at 10:21:17PM +0000, matthew green wrote:
> > 
> > va = va += PAGE_SIZE is possibly undefined.  remove the first "va = ".
> 
> pointless, but it should be well behaved.

It violates the rule about "Between the previous and next sequence point
an object shall have its stored value modified at most once by the
evaluation of an expression."  ISO 9899:1999 section 6.5 paragraph 1.
You are trying to store something into "va" more than once.

This is the same rule that makes {i = ++i;} illegal.

--apb (Alan Barrett)