https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107184

            Bug ID: 107184
           Summary: Copy warnings in dump files
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: glisse at gcc dot gnu.org
  Target Milestone: ---

One irritation with warnings like -Wuse-after-free and all the other
optimization-based warnings is how hard they are to track. Yes, it tells me
where the call is in my code, but that's far from enough. With
-fdump-tree-waccess, I can have some idea of what the code looks like, after
various optimizations, that makes the compiler warn. However, identifying the
relevant statements in the dump file can take a long time, and it remains
faster to break out the debugger on the compiler :-(
It seems that a small thing that could help a bit would be to print a copy of
the warnings and notes in the dump file, next to the relevant statements. Or at
least some easy to find marker.
I most certainly don't claim that this will solve anything, I just see it as a
low (?) hanging fruit.

Reply via email to