I finally trace down a typo bug, which is something similar to the following code. But shouldn't the compiler detect this (by default options)?
#include <stdio.h>
int main()
{
int c = c;
return printf("%d\n", c);
}
$ gcc --version
gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3
gcc -O3 -g -std=c99 -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wold-style-definition -c x.cand the complaints were about 'not a prototype' and 'old-style function definition' and not about the variable initialization. OTOH,clangdiagnosed:x.c:5:13: warning: variable 'c' is uninitialized when used within its own initialization [-Wuninitialized](but adding-Wuninitializedto the GCC options didn't add to the messages —clanghas better diagnostics here).-Winit-selfflag.-Wall -Wextradoes not include-Winit-selfin GCC 4.9.3.