Bugzilla – Bug 1211845
gcc does not report the warning -Wmaybe-uninitialized
Last modified: 2023-05-31 08:24:20 UTC
# The following script fails for me: ! echo >foo.c 'void *foo (int q) { void *r; if (q) r = 0; return r; }' || ! gcc -c -O -Wall -Werror foo.c # There should be a warning [-Wmaybe-uninitialized].
CCP (Conditional Constant Propagation) assumes any value for an uninitialized variable, effectively removing uninitialized uses before the second phase can detect them.