https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107844
--- Comment #3 from David Faust <david.faust at oracle dot com> --- Thanks for the info Andrew. I'll look at __builtin_offsetof. As for the implementation in clang, I can point to some bits relevant to the builtin itself: llvm-project/clang/lib/CodeGen/CGBuiltin.cpp CodeGenFunction::EmitBPFBuiltinExpr () llvm-project/llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp BPFAbstractMemberAccess::GetFieldInfo () But I am less familiar with the surrounding machinery such as their parsing and type systems..