1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun #ifndef _TOOLS_PERF_LINUX_BUG_H 3*4882a593Smuzhiyun #define _TOOLS_PERF_LINUX_BUG_H 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun /* Force a compilation error if condition is true, but also produce a 6*4882a593Smuzhiyun result (of value 0 and type size_t), so the expression can be used 7*4882a593Smuzhiyun e.g. in a structure initializer (or where-ever else comma expressions 8*4882a593Smuzhiyun aren't permitted). */ 9*4882a593Smuzhiyun #define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); })) 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun #endif /* _TOOLS_PERF_LINUX_BUG_H */ 12