tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] [PATCH] tccgen.c: Optimise 0<<x, 0>>x, -1>>x, x&0, x*


From: Edmund Grimley Evans
Subject: Re: [Tinycc-devel] [PATCH] tccgen.c: Optimise 0<<x, 0>>x, -1>>x, x&0, x*0, x|-1, x%1.
Date: Fri, 6 Mar 2015 09:42:30 +0000

> Why not to use  "vtop->c.ll = 0;" insteed of  "memset(&vtop->c, 0,
> sizeof(vtop->c));" ?

Because I like to write correct C. And it's a good idea to write
correct C because if you don't then a clever optimising compiler can
do weird things, like assuming that any code path that contains
undefined behaviour will never be executed, then drawing other
conclusions from that, and so on. Obviously TCC won't do these things
but TCC might be built with a different compiler.



reply via email to

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