/scratch/tony/working/arch/powerpc/kernel/cacheinfo.c: In function
'associativity_show':
/scratch/tony/working/arch/powerpc/kernel/cacheinfo.c:562:
warning: 'associativity' may be used uninitialized in this function
/scratch/tony/working/arch/powerpc/kernel/cacheinfo.c: In function
'size_show':
/scratch/tony/working/arch/powerpc/kernel/cacheinfo.c:513:
warning: 'size_kb' may be used uninitialized in this function
Thanks.
So I think I've convinced myself that the warnings are incorrect and
that uninitialized use is not possible.
Strictly speaking the warnings aren't incorrect: the variables
"may be used uninitialized", they just never are. I agree this
isn't very helpful.
But I find it odd that gcc gives warnings for these sites but not
others
in the file that use the same idiom (e.g. line_size_show,
nr_sets_show).
Yeah.
I'd guess that inlining is implicated somehow. Would I
be justified in worrying that this version of gcc is generating
incorrect code?
Not really. Sub-optimal code perhaps, but not incorrect.
If not, then I'm fine with the uninitialized_var() changes, but do
please include the warnings and the compiler version in the changelog.
If this happens with a non-ancient GCC version, can we have a bugreport
please?
Segher
_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev