melver wrote: For additional background: I'm trying to work out how to bring -Wthread-safety to the Linux kernel. Since -fexperimental-late-parse-attributes made the feature practical for complex C structs, I started to look at a strategy to enable the feature.
The current strategy is to create an opt-in mechanism (per subsystem), and since the constraints imposed by Wthread-safety already require subtly restructuring most code that would opt-in, I think having Wthread-safety-addressof part of the initial constraints imposed by Wthread-safety would be very helpful. In converting one subsystem I maintain, I was disappointed that things like `list_add(¬e, &guarded_list)` aren't caught. In general, I believe that the situation is analogous to C++ reference passing, and thus -Wthread-safety-addressof would be the right choice for new C projects. https://github.com/llvm/llvm-project/pull/123063 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits