https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104308
Kamil Dudka <kdudka at redhat dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|FIXED |--- Status|RESOLVED |ASSIGNED --- Comment #8 from Kamil Dudka <kdudka at redhat dot com> --- As spotted by Vincent Mihalkovic, the fix seems to be incomplete. If we run gcc-12.0.1-0.14.fc37.x86_64 on the following test-case, some diagnostic messages are still printed without any location info: $ cat test-memcpy.c #include <string.h> int main(void) { char a1[5]; char a2[5]; return (memcpy(a1, a2, 5) == a1); } $ gcc -fanalyzer -fdiagnostics-path-format=separate-events -c test-memcpy.c In function ‘main’: cc1: warning: use of uninitialized value ‘*(unsigned char (*)[5])(&a2[0])’ [CWE-457] [-Wanalyzer-use-of-uninitialized-value] test-memcpy.c:6:10: note: (1) region created on stack here 6 | char a2[5]; | ^~ cc1: note: (2) use of uninitialized value ‘*(unsigned char (*)[5])(&a2[0])’ here