Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is not for declaring constexpr variables, it is about how to implement a checker function that verifies an inline expression is constant. Plus some of the examples work back to C99 instead of C23, which I would wager close to zero people are using in real-world code bases.


You'd probably still win the wager but I do want to say there are some of us using C23. We even use it in our embedded systems running on arm based microcontrollers. Though we still do maintain some C89 code :(


C23 on embedded ARM is entirely painless as it’s all upstream GCC these days anyway.

The problem is if you want to also still support esp8266 which is forever stuck at GCC 8.4


  #define C(x) ((constexpr typeof(x)){ (x) })




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: