On 1/9/25 1:39 PM, Qing Zhao wrote:


On Jan 9, 2025, at 14:10, Jeff Law <jeffreya...@gmail.com> wrote:



On 1/9/25 10:48 AM, Qing Zhao wrote:


I think Jeff's patch is not reasonable since it boils down to not diagnose
-Warray-bounds but instead remove those stmts.
If these stmts are dead-code that are generated by compiler optimization (NOT 
from source code),
removing them before diagnosis is correct. (To avoid false positive warnings).
But I don't think we generally know if the problematic statements came from 
user code or were generated by the compiler.

To help the compiler catches real problems in the source code and avoid false 
positive warnings introduced by the compiler transformation, we might need to 
add flags in the IR to distinguish this?
This sounds like a path lined with peril -- I just don't see that we're likely to keep this data consistent through the various transformations.

Jeff

Reply via email to