bcc icon indicating copy to clipboard operation
bcc copied to clipboard

Use `-Werror=undef` when compiling bcc to catch issues when a macro is not defined.

Open chantra opened this issue 1 year ago • 1 comments

A macro which is not defined will default to 0, this can make it challenging to debug issues as the compiler will happily go ahead and treat an undefined macro to 0.

Here is an example case where it caught an issue: https://github.com/bpftrace/bpftrace/pull/2950/commits/a0eefb6491431d90457c38107a7724f4303e8312

chantra avatar May 29 '24 22:05 chantra

cc @yonghong-song as we were discussing this f2f.

chantra avatar May 29 '24 22:05 chantra