goto skips a variable initialization in C
C lets goto and switch jump past an initializer. The variable stays in scope holding garbage, and the warning -Wall gives you stops firing at -O1. Measured.
Read it →Parts of C that compile quietly and go wrong later. Each page states the behaviour, shows it measured against a real compiler, cites the standard, and gives a fix that needs no tooling.
C lets goto and switch jump past an initializer. The variable stays in scope holding garbage, and the warning -Wall gives you stops firing at -O1. Measured.
Read it →Tags for struct, union and enum sit in their own name space. Why struct S and an int called S coexist, and why C23 has six name spaces where C11 had four.
Read it →No: {0} zeroes the members and says nothing about the bytes between them. Byte dumps for {0}, C23 {}, memset and static storage, and what GCC 15 changed.
Read it →Why casting a float* to an int* returns a different answer at -O2 than at -O0, what the effective type rule actually says, and why memcpy costs nothing.
Read it →Neither: plain char is a third type and the implementation picks which. Signed on x86_64, unsigned on aarch64. What that breaks, and why -1 < 1u is false.
Read it →A loop that terminates at -O0 and runs forever at -O2, why 1 << 31 is still undefined in C23, and what -fwrapv, -ftrapv and UBSan each actually catch.
Read it →A VLA has no allocation failure path, so a large n is a SIGSEGV you cannot catch. Measured, plus the sizeof rule and the stack leak that does not happen.
Read it →The signal names no line, and three of these seven memory bugs never crash at all. What gdb, AddressSanitizer and UBSan each print, measured on GCC 11.4.
Read it →Every entry started as a bug fixed in Prism, a C transpiler with 46,261 tests. Building one means running into the corners of the language on purpose, repeatedly, with test cases that pin down what compilers actually do rather than what the documentation implies.
The write-ups are about C. Prism gets one section at the end of each page where it is relevant, and the plain-C fix always comes first, because most readers landing here want to get a build working rather than adopt a new tool.