https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104308
Bug ID: 104308 Summary: no location info provided for [-Wanalyzer-use-of-uninitialized-value] warnings Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: kdudka at redhat dot com Target Milestone: --- I can see new (technically valid) analyzer warnings with gcc-12 on Fedora rawhide without any location information being provided. This makes the output difficult to use for csdiff utilities as well as human reviewers: $ printf '#include <string.h>\nint main() { char s[5]; memmove(s, s + 1, 2); }\n' | gcc -fanalyzer -fdiagnostics-path-format=separate-events -c -xc - In function ‘main’: cc1: warning: use of uninitialized value ‘*(short unsigned int *)&s + 1’ [CWE-457] [-Wanalyzer-use-of-uninitialized-value] cc1: note: (1) use of uninitialized value ‘*(short unsigned int *)&s + 1’ here The same command produces no output with gcc-11.2.1 though.