logoalt Hacker News

0c3ca83 • today at 5:03 PM • 3 replies • view on HN

Where do you think the static analyzers are baked into for C?

    gcc -fanalyze ...
    clang -fsanitize=address ...
    etc

Replies

William_BB • today at 5:45 PM

I meant static analyzers like clang-tidy and cppcheck. `-fanalyze` I suppose is a fair comparison, but `fsanitize` is not since it's not even static

logicchains • today at 5:25 PM

Those aren't static analyzers, they're dynamic analyzers; they only catch issues at runtime.

➕ show 1 reply
metaltyphoon • today at 5:42 PM

If this is such a good default, why make me type `-fsanatize=address? Why isn't this the default when not doing "release mode"?

➕ show 2 replies