top | item 47077628

(no title)

zokier | 10 days ago

counted_by for struct fields actually is actually the part that afaik works today: https://embeddedor.com/blog/2024/06/18/how-to-use-the-new-co...

discuss

order

matheusmoreira|10 days ago

That's amazing. Thanks for that reference. If it's good enough for the kernel, then it's good enough for me to start using in my own projects.

It's really cool that the kernel is using this. The compiler must be generating simple bounds checking code with traps instead of crazy stuff involving magical C standard library functions. Perfect for freestanding nostdlib projects.