We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent edb0213 commit 9b8308eCopy full SHA for 9b8308e
_posts/2025-11-30-comptime-c-functions.md
@@ -23,6 +23,7 @@ main:
23
Here is how it is achieved in C:
24
- `static inline` allows inlining across compilation boundaries.
25
- `__attribute__((always_inline))` *strongly* urges compilers to inline functions.
26
+- `__builtin_unreachable()` is used to teach the optimizer which assumptions it can make about input arguments.
27
- Constant buffer addresses + sizes let the optimizer trace through `memcpy()` calls.
28
- All operations become statically analyzable, reducing to constants.
29
- `assert()` calls get eliminated when conditions are provably true.
0 commit comments