On Sun, Nov 07, 2021 at 10:13:11PM -0800, Andrii Nakryiko wrote: > +#define btf_dump__new(a1, a2, a3, a4) __builtin_choose_expr( \ > + __builtin_types_compatible_p(typeof(a4), btf_dump_printf_fn_t) + \ > + __builtin_types_compatible_p(typeof(a4), \ > + void(void *, const char *, va_list)), \ > + btf_dump__new_deprecated((void *)a1, (void *)a2, (void *)a3, (void *)a4),\ > + btf_dump__new((void *)a1, (void *)a2, (void *)a3, (void *)a4)) why '+' in the above? The return type of __builtin_types_compatible_p() is bool. What is bool + bool ? It suppose to be logical 'OR', right? Maybe checking for ops type would be more robust ? Like: #define btf_dump__new(a1, a2, a3, a4) __builtin_choose_expr( \ __builtin_types_compatible_p(typeof(a4), const struct btf_dump_opts*), \ btf_dump__new((void *)a1, (void *)a2, (void *)a3, (void *)a4), \ btf_dump__new_deprecated((void *)a1, (void *)a2, (void *)a3, (void *)a4))