Top all-time · #8704
Shafik Yaghmour
Personal blog · shafik.github.ioprogrammingsystems
Shafik Yaghmour's personal blog at shafik.github.io covers programming and systems. Since 2019, 9 different Hacker News readers have linked it 13 times, most often “Exploring undefined behavior using constexpr”. It is still writing: the last post was on 2025-09-22, and you can follow it by feed.
Too few sampled comments (3) to say how often HN recommends it.?
Why HN links it
Shafik Yaghmour's posts on C and C++ undefined behavior, constexpr, and GCC behavior. Commenters cite them as supporting references for points about compilers and UB, without evaluating the writing.
Summarised by Claude from a sample of 3 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.
Blog about C++, C, Undefined Behavior and Compilers
Most-linked posts?
- Exploring undefined behavior using constexpr6 people · 6 mentions · first linked 2019-05-11
- The Usual Arithmetic Confusions3 people · 3 mentions · first linked 2022-01-01
What Hacker News says?
Triggering UB is a compiler error in constexpr code. https://shafik.github.io/c++/undefined%20behavior/2019/05/11...
Comment linking /c++/undefined%20behavior/2019/05/11/explporing_undefined_behavior_using_constexpr.html
on “Learning that you can use unions in C for grouping things into namespaces”Submitted The Usual Arithmetic Confusions as a story · 44 points
HN discussionThis is technically correct, but I believe this is also a very buggy area of the compiler and there are cases where it will accept undefined behavior in a constexpr context: https://shafik.github.io/c++/undefined%20behavior/2019/05/11...
Comment linking /c++/undefined%20behavior/2019/05/11/explporing_undefined_behavior_using_constexpr.html
on “One Word Broke C”Submitted Triaging Clang C++ front end bugs as a story · 37 points
HN discussionC++ bans undefined behavior in constexpr, so you can force GCC to prove that code has no undefined behavior by sprinkling it in declarations where applicable: https://shafik.github.io/c++/undefined%20behavior/2019/05/11...
Comment linking /c++/undefined%20behavior/2019/05/11/explporing_undefined_behavior_using_constexpr.html
on “GCC undefined behaviors are getting wild”Submitted Exploring undefined behavior using constexpr as a story · 26 points
HN discussionSubmitted C++ initialization, arrays and lambdas oh my as a story · 5 points
HN discussionSubmitted Let’s Enumerate the UB as a story · 1 points
HN discussionSubmitted The Usual Arithmetic Confusions as a story · 1 points
HN discussionSubmitted The Usual Arithmetic Confusions as a story · 1 points
HN discussionSubmitted Exploring Undefined Behavior Using Constexpr (2019) as a story · 1 points
HN discussionSubmitted Is Zero a Butterfly? as a story · 1 points
HN discussionSubmitted Exploring Undefined Behavior Using Constexpr as a story · 1 points
HN discussion