Idea · Oct 15, 2026
Strictly C
A portability lab for systems courses that compiles each student's C code under several compilers, standards, and architectures, then explains every place where the program relied on undefined, unspecified, or implementation-defined behavior.
What it would do
The HN essay 'Your C is not standard C' and its thread (signed shifts, char signedness, GCC extensions, FENV_ACCESS) make a point most students never hear: code that works on their laptop is often not C, it is GCC-on-x86-64. Strictly C turns this into an assignment check. Students submit code; a Flask backend builds it in containers with gcc and clang at -std=c99, c11 and c23 with -pedantic-errors, runs it with UBSan and ASan, and also cross-runs it under QEMU on a big-endian and a 32-bit target with signed and unsigned char. Differences in output or warnings are grouped into findings such as 'relies on char being signed' or 'left shift of negative value', each linked to the relevant standard clause and a short, human-written explanation. The instructor view aggregates findings across a section so a lecture can start with 'here are the 5 non-portable habits this class has', and an optional Claude pass rewrites each finding as a question for the student instead of a fix.
Key features
- Build matrix across gcc/clang, C99/C11/C23, -pedantic-errors, x86-64, 32-bit ARM and big-endian MIPS via QEMU
- UBSan/ASan runs with diffed outputs across targets to catch behavior that only changes elsewhere
- Curated finding catalog that maps compiler and sanitizer messages to standard clauses and plain-language explanations
- Section-level dashboard of the most common non-portable habits
- Socratic mode that turns each finding into a question rather than a patch