Date: Sat, 17 Mar 2007 21:04:40 +0100 From: Christoph Mallon <christoph.mallon@gmx.de> To: Max Laier <max@love2party.net> Cc: cvs-src@freebsd.org, Jeff Roberson <jeff@freebsd.org>, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/kern sched_ule.c Message-ID: <45FC49D8.4010305@gmx.de> In-Reply-To: <200703172100.13218.max@love2party.net> References: <200703171813.l2HIDXWI008212@repoman.freebsd.org> <20070317110821.I560@10.0.0.1> <200703172100.13218.max@love2party.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Max Laier schrieb: > On Saturday 17 March 2007 20:09, Jeff Roberson wrote: >> Any language lawyers care to comment on this? > > I find this strange. According to the spec "(Decrementing is equivalent > to subtracting 1.)", but "pri = --pri % RQ_NQS;" will behave like you > expect, while "pri = (pri - 1) % RQ_NQS;" clearly didn't. "pri = --pri % RQ_NQS;" modifies "pri" twice between two sequence points. According to the C standard this causes undefined behaviour!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45FC49D8.4010305>