> On 26 Oct 2019, at 09:05, Akim Demaille <a...@lrde.epita.fr> wrote: > >> Le 25 oct. 2019 à 18:13, Paul Eggert <egg...@cs.ucla.edu> a écrit : >> >> On 10/25/19 7:15 AM, Théophile Ranquet wrote: >>> >>> This sounds interesting and I would love reading what people have to >>> say about this. However, I have failed at finding any such discussion >>> or source. Could you perhaps share a few pointers? >> >> >> I don't know of a good central email thread about this, but here's a style >> guideline: >> >> https://www.gnu.org/software/emacs/manual/html_node/elisp/C-Integer-Types.html > > About C++, this page has a good summary of the trend, which is "run away from > unsigned". > > https://stackoverflow.com/questions/18795453/why-prefer-signed-over-unsigned-in-c > > This talk is about undefined behavior, and why it's good to have some (in > particular because, as Paul already reported, this allows tools such as > sanitizers to catch these errors). > > https://youtu.be/yG1OZ69H_-o
Undefined behavior also allows modern optimization, so it is important to stick to the lang specs, see: http://blog.llvm.org/2011/05/what-every-c-programmer-should-know_21.html