On Mon, 13 Apr 2020, Geert Uytterhoeven wrote:
On Mon, Apr 13, 2020 at 11:37 AM Rob Landley <rob@xxxxxxxxxxx> wrote:
Did you know that if you disable optimizations you can get _more_
warnings?
_disabling_ the gcse optimization triggered one of those "may be used
uninitialized but is a false positive 99% of the time" which in this
case, turned out to have a path that could trigger in a function I
added last week, which which was called in an else case 5 lines down.
(Yes, when it DIDN'T segfault, it gave me the warning.)
It's indeed a pity. I looked into each and every one of them when I
could still compile the kernel with gcc 4.1, to find the few cases that
were real bugs...
It appears code generation and static analysis really are separate
problems. Code gen could be done faster when the user just wants an
executable and has no use for the analysis (up to 'git bisect'). And
static analysis works better when you have proper coverage, as you guys
have shown.