tinycc-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]