https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77430
Eric Gallager <egallager at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Blocks| |105887
--- Comment #3 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Eric Gallager from comment #2)
> Confirmed, the clang static analyzer catches this:
>
> $ /sw/opt/llvm-3.1/bin/clang --analyze -Wall -Wextra -pedantic 77430.c
> 77430.c:3:5: warning: Value stored to 'a' is never read
> a = 0;
> ^ ~
> 1 warning generated.
> $
gcc's -fanalyzer doesn't help, so this is part of the static analyzer subset of
overall clang compatibility issues.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105887
[Bug 105887] [meta-bug] clang analyzer warnings that GCC's -fanalyzer could
implement