https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87038
Harald van Dijk <harald at gigawatt dot nl> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |harald at gigawatt dot nl
--- Comment #9 from Harald van Dijk <harald at gigawatt dot nl> ---
(In reply to Segher Boessenkool from comment #8)
> -Wall please, unless there are frequent false positives.
-Wjump-misses-init warns for harmless code such as
int f1();
int f2();
void f3(int);
void f4(int a) {
switch (a) {
case 0:;
int i = f1();
f3(i);
break;
case 1:
i = f2();
f3(i);
break;
}
}
Here, yes, the initialisation is jumped over, but the variable is never used
uninitialised. clang manages to avoid warning for this.