Topic
Everything filed under C, newest first.
RSS · JSON · All topics
Fun Extending the C Preprocessor
David Priver, who is writing his own C2Y compiler/interpreter/REPL, shows extensions he added to its C preprocessor, including __print() and __where() debugging builtins, a native __map() that replaces recursive macro hacks, and __VA_COUNT__ for counting variadic arguments.
5 min · 1,147 words
Corey Prophitt describes shipping marketyour.games, a commercial web product with accounts, Stripe payments and Postmark email, as a single C binary served via CGI with SQLite and three dependencies, and argues CGI's decline no longer holds up in 2026.
5 min · 1,237 words
C++ futures part 1: The mental model
Raymond Chen starts a series on C++ std::promise, std::packaged_task, std::async and std::future by modeling them as a single shared state he calls the source, and sketches how that source produces, stores and hands off a value or exception.
3 min · 688 words
C vs C#: racing VLC's Gaussian blur
Martin Finkel ports a real VLC video filter, the Gaussian blur, line by line to C# with .NET Native AOT and races it against the original C inside VLC 4 on the same frames with byte-identical output, then optimizes both sides and compares again.
9 min · 2,060 words
Chasing a -O2 pessimization in antcc
The author of the antcc C compiler investigates why a Lua benchmark ran slower at -O1 and -O2 than unoptimized, digging into the interpreter dispatch loop, register allocation, SSA phi handling and stack slots to find and fix the optimization that made the code worse.
12 min · 2,750 words
An incomplete list of incompatibilities between C as written in the ISO standard and C as it exists for people using gcc/clang with glibc/musl, covering the asm keyword, FLT_ROUNDS, standard floating-point pragmas, and other places where real toolchains are not conformant by default.
4 min · 986 words
I can't use generic lambdas at compile-time, now what?
Braden Ganetsky follows up his 'Break MSVC and Clang' post with a deep dive into working around a Clang bug that blocks using generic lambdas in constant evaluation, explaining how he got a compile-time C++ technique to work on Clang 16 onward.
16 min · 3,598 words
C++26 Contracts: Introduction to Preconditions and Postconditions
C++ Stories introduces C++26 contracts: pre() and post() on function declarations and contract_assert() inside functions, why they beat assert, the ignore/observe/enforce/quick-enforce evaluation semantics, compiling examples with GCC, const parameters in postconditions, avoiding side effects in predicates, predicate cost, and why contracts are not a replacement for input validation.
9 min · 2,052 words
A follow-up to a post on math_errhandling that digs into strtod and friends, showing why errno and floating-point exceptions cannot portably detect overflow, underflow or invalid input in standard C across glibc and musl, and what checks you can do instead.
7 min · 1,594 words
Frank Denis shows that LLVM compiles a plain 128-bit addition into conditional branches on 32-bit RISC-V, explains why that breaks constant-time assumptions in cryptographic code, compares GCC and the Zicond extension, and discusses how hard portable side-channel-safe code really is.
5 min · 1,208 words
How to Fix autoconf-style Config Probing
Boris Kolpackov explains why autoconf/CMake-style configuration probing, which compiles and links test programs to detect features, silently produces wrong results, and proposes fixes tested in build2: control probes that must succeed, stricter error detection and more, with roughly half a second of overhead for 500 probes.
9 min · 2,021 words
Zeroization, part 1: Wiping can make things worse
Frank Denis shows how blindly adding zeroization calls for secrets can leave more copies of a secret in memory than the original code. Using compiled C examples, he covers memset being optimized away, how taking a variable's address forces it onto the stack, and what stays live across calls, and advises checking the optimized build you actually ship.
6 min · 1,382 words
Calling a function in C without naming it
A student describes getting shell access through a school's automated C grading system, which bans calling execve by name. Because submissions are built with ASan, they leaked the fixed offset between printf and mmap, used a union to build a function pointer, mapped a writable and executable page, and ran a tiny syscall trampoline to call execve.
7 min · 1,558 words
The complement of true is true, except when it's false
Matthew Taylor digs into a C++26 bitmask-enum proposal and the surprising boolean-algebra edge cases around complements, truthiness, and what ‘all bits set’ really means in practice.
15 min · 3,463 words
01 Fiscal sponsorship Receive and manage donations on behalf of EDG. The EDG open source transition On September 30, 2026, the source for EDG's C++ front end goes public, and The C++ Alliance becomes its nonprofit home. Same engine, same standards, professionally maintained, and open to contributions. Continuity is the point. This is a change of steward, not a change of course.
3 min · 730 words
C++26: the new debugging header
Sandor Dargo explains C++26's new <debugging> header from P2546R5 and P2810R4, which standardizes what projects like Boost.Test, Catch2, Dear ImGui and Unreal each reinvented: std::breakpoint, std::is_debugger_present and std::breakpoint_if_debugging, replacing platform-specific breakpoint macros.
2 min · 559 words
Using any C++ library in Godot
Using any C++ library in Godot Godot has become one of the most popular game engines of the last few years. It is free, open source under the MIT license, and small enough to download and start using in minutes.
10 min · 2,353 words
C's Flexible Integer Sizes Were Not a Design Mistake
Gustavo Pezzi defends C’s platform-sized integers: how 12–60-bit machines shaped int, why minimum ranges beat fixed widths, and what Lua’s portable C still teaches.
2 min · 486 words
a hacky fucked up way to portably access errno from outside of c
sebsite shows a cursed but portable way to read errno from Hare without a C wrapper: redirect stderr to a temporary file, call perror, read back the message, and match it against a table of strerror strings to recover the error number.
6 min · 1,389 words
A practitioner walkthrough of type punning pitfalls: why a pointer cast that works at -O0 can silently break at -O2, and how C versus C++ rules diverge in treacherous ways.
3 min · 585 words