unfashionable C
In computer science academia, C along with UNIX, and PDP11s, is as unfashionable as can be: the equivalent of other 1970’s relics, like polyester leisure suits and mullets. In 2018 ACM Queue published an essay by David Chisnall called: C
Undefined behavior in C is a reading error.
Considering how important “undefined behavior” has become to C semantics and the ISO/IEC JTC1/SC22/WG14 Committee, the lack of any reference to it in the K&R ANSI book is notable and the description in the 1999 C Rationale was quite modest.
undefined behavior and the purpose of C
The C programming language is designed to let programmers work at both low and high levels. In particular, for applications like operating system development, cryptography, numerical methods, and network processing, programmers can go back and forth between treating data as
Three modest proposals for the C standard WG14
Note: these were sent to WG14 as official proposals. See also a longer paper, something on alias and Torvalds remarks and Regehr’s paper. 6.12 Proposal to clarify undefined behavior range for implementations [N 2278] 6.13 Proposal to make aliasing consistent [N
Pointer alias analysis in C
Perhaps there is some reason to provide a mechanism for asserting, in a particular patch of code, that the compiler is free to make optimistic assumptions about the kinds of aliasing that can occur. I don’t know any acceptable way of
Depressing and faintly terrifying days for the C standard
C STANDARD UNDEFINED BEHAVIOR VERSUS WITTGENSTEIN 1. DEPRESSING AND FAINTLY TERRIFYING Chris Lattner, the architect of the Clang/LLVM C compiler explained the effects of the C standard’s “undefined behavior (UB): UB is an inseperable part of C programming, […] this
More UB madness from LLVM/Clang
Via @johnregehr this further tale of compiler “optimizations” that break correct C code without even a warning by deleting a necessary null pointer check. In this example, Bar contains a stack of Foos. Sometimes the Foo stack is empty, so
C compiler developers are hostile to C programming
From the LLVM developer mailing list this remarkable exchange in which Chris Lattner of LLVM says that the compiler use of undefined behavior (UB) is so “crappy” that the only solution is to abandon C programming (my bold). On Jul
The C standard versus C and the mother of all hacks.
The Kafkaesque interaction of the C standard and the main open source C compilers was concisely outlined by one of the main LLVM authors back in 2011: “knowing that INT_MAX+1 is undefined allows optimizing X+1 > X to “true”. Knowing