On Monday, January 6th, 2025 at 11:21 AM, Ihor Solodrai <ihor.solodrai@xxxxx> wrote: > > [...] > > > I was wondering how clang handles this, and it turns out > -fno-strict-aliasing is true by default in clang [1]: > > -fno-strict-aliasing Disable optimizations based on strict aliasing rules (default) > > [1]: https://clang.llvm.org/docs/UsersManual.html Whoops, that's about clang-cl, sorry. Assuming clang does check for aliases, I guess it means clang just doesn't detect these violations. > > > > # Some utility functions use LLVM libraries > > > jit_disasm_helpers.c-CFLAGS = $(LLVM_CFLAGS) > > > > > > @@ -507,7 +511,7 @@ endef > > > # Build BPF object using GCC > > > define GCC_BPF_BUILD_RULE > > > $(call msg,GCC-BPF,$4,$2) > > > - $(Q)$(BPF_GCC) $3 -DBPF_NO_PRESERVE_ACCESS_INDEX -Wno-attributes -O2 -c $1 -o $2 > > > + $(Q)$(BPF_GCC) $3 -DBPF_NO_PRESERVE_ACCESS_INDEX -Wno-attributes -O2 -std=gnu17 -c $1 -o $2 > > > endef > > > > > > SKEL_BLACKLIST := btf__% test_pinning_invalid.c test_sk_assign.c