Re: Development is hard if you can't trust your compiler (aka gcc6 did it again)
On Tue, 18 Jul 2017 14:30:06 +0100
Daniel Thompson <firstname.lastname@example.org> wrote:
On 18/07/17 13:50, Paul Sokolovsky wrote:Heh, removing all I wrote in the unsent version of this reply, indeed,Hello,What is the definition of pollfds; if is has NUM_FDS elements then
it's my bug. It's the "for" played bad trick on me, seeing its surface
form one can forget that first "for"'s condition is checked, then "if"
inside is checked, and only then "for"'s trailing operation is executed.
Apparently, I subconsciously wanted the inside "if" to run after
So, I withdraw "the real bug" valuation, it's just another case when
very well defined "undefined" behavior is turned by outsmart
compiler into truly undefinable behavior (all for programmer's good, as
in this case - I of course rewrote that loop before submitting it, btw
it was written like that in the first place to avoid "goto" (or
checking the same var twice, which is no-no!)).
Linaro.org | Open source software for ARM SoCs
Follow Linaro: http://www.facebook.com/pages/Linaro
http://twitter.com/#!/linaroorg - http://www.linaro.org/linaro-blog