https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116864
Bug ID: 116864 Summary: "*<unknown>" and "......" in false positive -Wanalyzer-use-of-uninitialized-value Product: gcc Version: 14.2.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: eggert at cs dot ucla.edu Target Milestone: --- Created attachment 59213 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59213&action=edit gunzip and compile with "gcc -O2 -S -fanalyzer" on x86-64 to see the bug Normally coreutils isn't compiled with -fanalyzer, but I recently tried it (by using './configure --enable-gcc-warnings=expensive') and quickly gave up because there were too many false positives. I'm reporting the first false positive. At least I *think* it's a false positive: the diagnostic is so puzzling and gives so few details that it's hard to see what GCC is complaining about. This is gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3) on x86-64. Decompress and compile the attached file t.i.gz with: gunzip t.i.gz gcc -O2 -S -fanalyzer t.i GCC outputs the following, which I can't decipher, as all the details are listed as "*<unknown>" or "......". parse-datetime.c: In function ‘yyparse’: parse-datetime.c:1820:9: warning: use of uninitialized value ‘*<unknown>’ [CWE-457] [-Wanalyzer-use-of-uninitialized-value] ‘parse_datetime’: events 1-2 | |parse-datetime.y:2395:1: |...... | ‘parse_datetime’: events 3-4 | |parse-datetime.y:2402:12: | +--> ‘parse_datetime_body’: event 5 | |parse-datetime.y:1739:1: | ‘parse_datetime_body’: events 6-8 | |parse-datetime.y:1821:6: |...... |...... | ‘parse_datetime_body’: event 9 | |parse-datetime.y:1841:18: | ‘parse_datetime_body’: event 10 | |parse-datetime.y:1870:3: | +--> ‘populate_local_time_zone_table’: event 11 | |parse-datetime.y:1577:1: | ‘populate_local_time_zone_table’: events 12-13 | |parse-datetime.y:1590:6: |...... | <------+ | ‘parse_datetime_body’: events 14-15 | |parse-datetime.y:1870:3: |...... | ‘parse_datetime_body’: event 16 | |parse-datetime.y:1877:19: | ‘parse_datetime_body’: event 17 | |parse-datetime.y:1902:7: | +--> ‘yyparse’: events 18-20 | |parse-datetime.c:1572:1: |...... |...... | ‘yyparse’: events 21-28 | |parse-datetime.c:1715:6: |...... |...... |...... |...... | +--> ‘yylex’: event 29 | |parse-datetime.y:1416:1: | ‘yylex’: event 30 | |parse-datetime.y:1518:16: | +--> ‘lookup_word’: event 31 | |parse-datetime.y:1348:1: | ‘lookup_word’: events 32-34 | |parse-datetime.y:1361:29: | ‘lookup_word’: event 35 | |cc1: | (35): ...to here | <------+ | ‘yylex’: events 36-37 | |parse-datetime.y:1518:16: | ‘yylex’: event 38 | |parse-datetime.y:1525:29: | <------+ | ‘yyparse’: events 39-49 | |parse-datetime.c:1739:16: |...... |...... |...... |...... | ‘yyparse’: events 50-51 | |parse-datetime.c:1800:6: | ‘yyparse’: event 52 | |parse-datetime.c:1820:9: |