From patchwork Wed Feb 1 02:24:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 64062 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D8E4E3858434 for ; Wed, 1 Feb 2023 02:24:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D8E4E3858434 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675218279; bh=6/ghdrvHj5vDmDWnRElE95GmepUAqCiXoKSbrPD2kaE=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=wCqfOpK13gQ2nVIciwImL6Izj9uH1KSRfGzrJx1+5mx85EnZR26kRxIW8chqU7XGD 68qlLvkWlyvI1mPjHoHc4mj0dknTZZP0BvCrRBbaS+a1dVulP/G2OG8IXiG4nS52MY 6NdW46KGOC0/hh9ZH8LFEnTO433B6uJTH1hTKrmI= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id B0E1F3858D38 for ; Wed, 1 Feb 2023 02:24:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B0E1F3858D38 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-372-IHFzS2IuOI6afj_sPjc8AQ-1; Tue, 31 Jan 2023 21:24:08 -0500 X-MC-Unique: IHFzS2IuOI6afj_sPjc8AQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 000963806621 for ; Wed, 1 Feb 2023 02:24:07 +0000 (UTC) Received: from t14s.localdomain.com (unknown [10.2.17.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id C86E22166B33; Wed, 1 Feb 2023 02:24:07 +0000 (UTC) To: gcc-patches@gcc.gnu.org Cc: David Malcolm Subject: [pushed] doc: add notes about limitations of -fanalyzer Date: Tue, 31 Jan 2023 21:24:06 -0500 Message-Id: <20230201022406.824321-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: David Malcolm via Gcc-patches From: David Malcolm Reply-To: David Malcolm Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as r13-5613-ga90316c6ceddfb. gcc/ChangeLog: * doc/invoke.texi (Static Analyzer Options): Add notes about limitations of -fanalyzer. Signed-off-by: David Malcolm --- gcc/doc/invoke.texi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi index 06d77983e30..ddeeea5ccb4 100644 --- a/gcc/doc/invoke.texi +++ b/gcc/doc/invoke.texi @@ -10064,6 +10064,13 @@ code, and issues warnings for problems found on them. This analysis is much more expensive than other GCC warnings. +In technical terms, it performs coverage-guided symbolic execution of +the code being compiled. It is neither sound nor complete: it can +have false positives and false negatives. It is a bug-finding tool, +rather than a tool for proving program correctness. + +The analyzer is only suitable for use on C code in this release. + Enabling this option effectively enables the following warnings: @gccoptlist{ @gol