This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the EGCS project.
Incorrect `might be used uninitialized' message
- To: gcc-bugs@gcc.gnu.org
- Subject: Incorrect `might be used uninitialized' message
- From: talon@clark.net
- Date: Sat, 31 Jul 1999 08:18:25 -0400 (EDT)
/* Demonstrates bug in egcs-2.91.66 on FreeBSD 3.2. To see the bug,
compile using:
gcc -c token.c -g -Wall -O2
The bug is the warning:
token.c:17: warning: `c' might be used uninitialized in this function
egcs-2.91.60 on Solaris 2.6 reports this message twice.
*/
extern int getch();
extern int class();
int
token()
{
int state = 1;
while (1) {
int c=0;
c = getch();
switch (state) {
case 1: break;
case 4: break;
case 5: break;
case 6:
{
switch (class(c)) {
default: break;
}
} break;
case 7: break;
}
}
}