efriedma-quic wrote: > Previously @AaronBallman has expressed that diagnostics should not differ > between optimization levels. I think there's a subtle difference here; for > backend diagnostics, encouraging the user to enable debug info can add > additional/helpful notes, in this case for potentially stopping buffer > overflows known at compile time (for the Linux kernel's implementation of > FORTIFY_SOURCE) for which clang is currently strictly worse than GCC here.
The notion of diagnosing buffer overflows at compile-time sounds great, but doing it in the backend has practical problems... among other issues, we've had multiple bug reports that boiled down to "a false-positive diagnostic triggered because of a missed optimization" . Anyway, that's only indirectly related to this patch. I don't think modifying the text of the notes based on information we have available will cause any practical issues. The consistency issue is mostly about whether the primary diagnostic is consistent. https://github.com/llvm/llvm-project/pull/174892 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
