Friends -

On Sun, Sep 24, 2017 at 12:27:17PM -0700, Larry Doolittle wrote:
> On Sun, Sep 24, 2017 at 09:48:25AM +0200, Jan Nieuwenhuizen wrote:
> > -    p[0] = x & 255, p[1] = x >> 8 & 255;
> 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?

I tested it, and it does in fact work.  Sorry, I got a little mixed up
on the order of operations.

Still, using comma there instead of semicolon seems needlessly confusing.
It suggests that these were once tricky macro expansions instead
of inline functions.  If it were me I would use semicolon there
(write32le()) and in write64le().

   - Larry

_______________________________________________
Tinycc-devel mailing list
Tinycc-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to