3 ms·
Any constant expression. In the kernel it's mostly non-zero flags, sizes of things, etc. See https://github.com/torvalds/linux/search?utf8=%E2%9C%93&q=BUILD_BUG
by viraptor 10y ago
Any constant expression. In the kernel it's mostly non-zero flags, sizes of things, etc. See https://github.com/torvalds/linux/search?utf8=%E2%9C%93&q=BUILD_BUG_ON_ZERO https://github.com/torvalds/linux/search?utf8=%E2%9C%93&q=BU...
There's also a fun compile time check for arrays: https://github.com/torvalds/linux/blob/1001354ca34179f3db924eb66672442a173147dc/include/linux/compiler-gcc.h#L64 https://github.com/torvalds/linux/blob/1001354ca34179f3db924...