Uninitialized variable warnings
craig@jcb-sc.com
craig@jcb-sc.com
Mon Mar 15 02:45:00 GMT 1999
>There are a number of other places where gcc has gotten it wrong, and
>a few places where the warning indicates a real bug. There's also one
>worrisome case, where we get it right or not unpredictably:
>
>if(x == THING_1) var = val1;
>else if(x == THING_2) var = val2;
>else if(x == THING_3) var = val3;
>...
>else abort();
>...
>use(var);
Could you be more precise about "unpredictably"? Specifically, do you
mean it's unpredictable all the way down to identical chunks of code
(in separate functions, say) compiled a *single* time? Or across
multiple runs of the exact same compiler? Or do you just mean it's
unpredictable across compiler targets (which might be explained by
differences in whether abort() is known to have its noreturn attribute)?
tq vm, (burley)
More information about the Gcc
mailing list