rjmccall wrote: > I'm seeing evidence that this might be a chatty diagnostic in practice: > > https://sourcegraph.com/github.com/torvalds/linux@90d35da658da8cff0d4ecbb5113f5fac9d00eb72/-/blob/kernel/fork.c?L311 > > https://sourcegraph.com/github.com/torvalds/linux@90d35da658da8cff0d4ecbb5113f5fac9d00eb72/-/blob/mm/util.c?L644 > > https://sourcegraph.com/github.com/torvalds/linux@90d35da658da8cff0d4ecbb5113f5fac9d00eb72/-/blob/arch/arm/mm/nommu.c?L224 > > https://sourcegraph.com/github.com/torvalds/linux@90d35da658da8cff0d4ecbb5113f5fac9d00eb72/-/blob/kernel/scs.c?L48 > (and quite a few others). > > CC @nathanchance @nickdesaulniers @rjmccall for opinions
Does anyone understand why Linux uses `__builtin_return_address` there? On first glance, I'd think this is exactly the sort of thing that the warning ought to be warning about — a `static` function that could easily be inlined into its callers. Have we consider the alternative of just disabling inlining when a function uses `__builtin_return_address`? The middle-end already knows that there are things it can't inline. Although I seem to remember having seen code that uses `always_inline` in order to force `__builtin_return_address` to actually apply to its caller. https://github.com/llvm/llvm-project/pull/82966 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits