[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Using tinycc for full source bootstrapping
From: |
Larry Doolittle |
Subject: |
Re: [Tinycc-devel] Using tinycc for full source bootstrapping |
Date: |
Sun, 24 Sep 2017 12:27:17 -0700 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
Friends -
On Sun, Sep 24, 2017 at 09:48:25AM +0200, Jan Nieuwenhuizen wrote:
> - p[0] = x & 255, p[1] = x >> 8 & 255;
> + p[0] = x & 255; p[1] = x >> 8 & 255;
I think the comma operator is an awesome part of the C standard,
and sometimes permits much more clear and concise expression of
process than would otherwise be possible.
The original line above, however, screams "I am a bug" to me.
The return value of "x & 255" is ignored, and it has no side effects,
so it can be discarded, leaving
p[0] = p[1] = x >> 8 & 255;
Is there any evidence it works?
- Larry
- Re: [Tinycc-devel] Using tinycc for full source bootstrapping, (continued)
- Re: [Tinycc-devel] Using tinycc for full source bootstrapping, u-jps5, 2017/09/26
- Re: [Tinycc-devel] Using tinycc for full source bootstrapping, KHMan, 2017/09/26
- Re: [Tinycc-devel] Using tinycc for full source bootstrapping, Michael B. Smith, 2017/09/26
- Re: [Tinycc-devel] Using tinycc for full source bootstrapping, KHMan, 2017/09/26
- Re: [Tinycc-devel] Using tinycc for full source bootstrapping, Michael B. Smith, 2017/09/26
- Re: [Tinycc-devel] Using tinycc for full source bootstrapping, KHMan, 2017/09/26
- Re: [Tinycc-devel] Using tinycc for full source bootstrapping, Christian Jullien, 2017/09/27
- Re: [Tinycc-devel] Using tinycc for full source bootstrapping, Kamil Rytarowski, 2017/09/27
- Re: [Tinycc-devel] Using tinycc for full source bootstrapping, u-jps5, 2017/09/27
Re: [Tinycc-devel] Using tinycc for full source bootstrapping,
Larry Doolittle <=