Skip to content

Commit f5bb155

Browse files
authored
Update 2025-11-30-comptime-c-functions.md
1 parent a7070ea commit f5bb155

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

_posts/2025-11-30-comptime-c-functions.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ title: "Comptime C functions"
44
date: 2025-11-29 12:00:00 +0100
55
---
66

7+
Compile-time function execution is great, but what if you're stuck with C?
8+
9+
The below programs compile `main()` down to the single `printf()` statement at the very end that prints that the test passed.
10+
711
# Generic Stack
812

9-
[Compiler Explorer](https://godbolt.org/z/PaoT9j1Ed)
13+
Copy of the code on [Compiler Explorer](https://godbolt.org/z/PaoT9j1Ed):
1014

1115
```c
1216
#include <assert.h>
@@ -90,7 +94,7 @@ int main(void) {
9094
9195
# Generic Hash Map
9296
93-
[Compiler Explorer](https://godbolt.org/z/16xhne83s)
97+
Copy of the code on [Compiler Explorer](https://godbolt.org/z/16xhne83s):
9498
9599
```c
96100
#include <assert.h>

0 commit comments

Comments
 (0)