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: Joerg Sonnenberger <joerg%britannica.bec.de@localhost>
To: Dave Huang <khym%azeotrope.org@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: Sat, 27 Feb 2016 08:44:19 +0100
On Fri, Feb 26, 2016 at 05:40:11PM -0600, Dave Huang wrote:
> 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;"
I think that's one is just a left-over from earlier versions, since
sequencing rules are explicit for that case. The second example
"a[i++]=i" on the other hand is still undefined.
Joerg
Home |
Main Index |
Thread Index |
Old Index