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

See the one I wrote for the Linux kernel; it will error at build time on a non-array (using tyoeof).

Even better, grab it from CCAN: http://ccodearchive.net/info/array_size.html

Cheers, Rusty.



Thanks!

I see you use __builtin_types_compatible_p, which looks very useful but also appears to be a GCC-specific.




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

Search: