NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-hp300/50852: src/sys/arch/hp300/stand/common/ite.c:239: bad expression



The following reply was made to PR port-hp300/50852; it has been noted by GNATS.

From: Dave Huang <khym%azeotrope.org@localhost>
To: Joerg Sonnenberger <joerg%britannica.bec.de@localhost>
Cc: "gnats-bugs%NetBSD.org@localhost" <gnats-bugs%netbsd.org@localhost>,
	"gnats-admin%netbsd.org@localhost" <gnats-admin%netbsd.org@localhost>,
	"netbsd-bugs%netbsd.org@localhost" <netbsd-bugs%netbsd.org@localhost>
Subject: Re: port-hp300/50852: src/sys/arch/hp300/stand/common/ite.c:239: bad
 expression
Date: Fri, 26 Feb 2016 17:40:11 -0600

 On Sat, Feb 27, 2016 at 12:10:21AM +0100, Joerg Sonnenberger wrote:
 > On Fri, Feb 26, 2016 at 05:04:46PM -0600, Dave Huang wrote:
 > > How is the code in question different from i = ++i;, which I've always
 > > been told is undefined? The assignment operator does not introduce a
 > > sequence point.
 > 
 > At least in C11, it does.
 
 Hmm, well I'm no language lawyer, but footnote 84 in section 6.5 of
 http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf (the C1X
 draft) says "This paragraph renders undefined statement expressions
 such as i = ++i + 1;"
 
 However, I did see someone say that i = ++i + 1 is well-defined
 starting in *C++* 11.
 


Home | Main Index | Thread Index | Old Index