News for hackers. Stuff that matters.
Re:Falsehoods programmers believe about undefined behavior by cesarb on Monday November 28, 2022 @07:50AM (#33772975)
> C compilers are pretty deterministic, same input same output, except timestamps, etc.

"Sometimes gcc will opt to use a randomized model to guess branch probabilities, when none are available from either profiling feedback (-fprofile-arcs) or __builtin_expect. This means that different runs of the compiler on the same program may produce different object code." (from the gcc manual)

Re:Falsehoods programmers believe about undefined behavior by dooglius on Monday November 28, 2022 @08:55AM (#33773660)
Looked into this and it appears it was not the case; the docs were confusingly written, and the docs appear to have been rewritten some time ago

https://marc.info/?l=gcc&m=102068997020453&w=2