Hello!

$ man gcc says that "Some checkers are disabled by default (even with
-fanalyzer), such as the "taint" checker that implements
-Wanalyzer-tainted-array-index, and this option is required to enable
them." but still lists the -Wanalyzer-tainted-* checkers under
-fanalyzer saying "Enabling this option effectively enables the
following warnings:"

This patch comments out the tainted-* checkers so that when
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103533 gets fixed we can
remove the comment and list them under -fanalyzer

Also, the above wording suggests that `-fanalyzer
-fanalyzer-checker=taint` enables the taint checkers in addition to
the default checkers but currently, enabling -fanalyzer-checker=taint
stops other checkers. This patch documents that too.

Please find the attached patch.

Thanks!

Regards,
Avinash Sonawane (rootKea)
https://www.rootkea.me
>From 764baac8ffed188d50293f0991ab43c97b63cc8a Mon Sep 17 00:00:00 2001
From: Avinash Sonawane <root...@gmail.com>
Date: Tue, 22 Mar 2022 07:32:44 +0530
Subject: [PATCH] Docs: Document that taint analyzer checker stops other
 checkers

---
 gcc/doc/invoke.texi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 4da4a1170f5..1996b54cf28 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -9666,11 +9666,13 @@ Enabling this option effectively enables the following warnings:
 -Wanalyzer-shift-count-negative @gol
 -Wanalyzer-shift-count-overflow @gol
 -Wanalyzer-stale-setjmp-buffer @gol
+@ignore
 -Wanalyzer-tainted-allocation-size @gol
 -Wanalyzer-tainted-array-index @gol
 -Wanalyzer-tainted-divisor @gol
 -Wanalyzer-tainted-offset @gol
 -Wanalyzer-tainted-size @gol
+@end ignore
 -Wanalyzer-unsafe-call-within-signal-handler @gol
 -Wanalyzer-use-after-free @gol
 -Wanalyzer-use-of-uninitialized-value @gol
@@ -10015,6 +10017,8 @@ such as the @code{taint} checker that implements
 @option{-Wanalyzer-tainted-array-index}, and this option is required
 to enable them.
 
+@emph{Note:} currently, @option{-fanalyzer-checker=taint} stops all other checkers.
+
 @item -fno-analyzer-feasibility
 @opindex fanalyzer-feasibility
 @opindex fno-analyzer-feasibility
-- 
2.32.0

Reply via email to