I read the Xen source code and saw something like this:
#define is_domain_direct_mapped(d) ((void)(d), 0)
is_domain_direct_mapped is then used in the if statement as follows (d is a pointer to a structure variable):
if( is_domain_direct_mapped(d) ) {...}
So, after the compiler replaces is_domain_direct_mapped with its definition, we have something like:
if( ((void)(d), 0) ) {...}
The above if statement is very strange to me. This is the first time I see such an expression. How should this work?
source
share