3 ms·
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/in
by RustyRussell 12y ago
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 http://ccodearchive.net/info/array_size.html
Cheers,
Rusty.
- AceJohnny2 12y agoThanks! I see you use __builtin_types_compatible_p, which looks very useful but also appears to be a GCC-specific.