From patchwork Wed Feb 8 17:37:09 2023
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: David Malcolm
X-Patchwork-Id: 54548
Return-Path:
Delivered-To: ouuuleilei@gmail.com
Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp3590570wrn;
Wed, 8 Feb 2023 09:39:31 -0800 (PST)
X-Google-Smtp-Source:
AK7set8jlXuylA0xCObI0n/O3jfFtNZKjwv4dWbBiuFek/AyxBZlEo6JrMmAaYpdF4ApwDXUmkKq
X-Received: by 2002:a50:8a86:0:b0:4aa:a829:31f7 with SMTP id
j6-20020a508a86000000b004aaa82931f7mr8887379edj.17.1675877971807;
Wed, 08 Feb 2023 09:39:31 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1675877971; cv=none;
d=google.com; s=arc-20160816;
b=SoseBkhWbYUoMvzYr0comRyy6WriXMPyw21TGHx/ILzZ6O/QbgTz1q2lfls7/Qt4S/
qq7o+2HtWMFxwKySGh+piiN5b6Yh74kcVOKkR347AQd3a6NjJ/ADqvNSIOfLB98MtSrD
1G4muVN3CjM/kRrk8+8wXnS+ZSw9UlkuH/Cg2JlgUVBHKmxe39Lh33Zt7i9dLFuGII2v
UZmJMURlPrQ67ufTKBtDqbniEhLF5kjdqqYHUy+wwHKbQAw99S8j+jOHSI24o62hQ3Kh
/YCJEO28q9SdZEYmvkHipLzfUO9+zzocjZ0eW5ca9diezyauuTn0HAqcawKmvKTqRs/g
n6zQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20160816;
h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post
:list-archive:list-unsubscribe:list-id:precedence
:content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:dmarc-filter:delivered-to
:dkim-signature:dkim-filter;
bh=SyihfsjEll7DxyU8njlrM714NfSJsXgBRbo+CxG/Kg0=;
b=mZNLMbo7VdGZgofKfWN0tg+LgJwD2eKndoV194uN5cy5QKdtv82cXce9NBZ51spGf5
LDOwMZNRBsvGGEMt2ofMGcUHypAepbANcxi3/Ip3rr0mxltdC3dG3wxe14cPRONjZnJ6
4U9hUsY/69co2iOCytsOEyTJX6UaxF9Zkb7RCtUaWTrVa8fsOndPNtAcCx/sy+lcbbm0
GIdiTzZMROf6b7j3ZsaBMRneimca8FtJxnMYHKM3GObbwrRR+lp3hfYJoJQKj6hAaIad
hrqSAnh0+tWi7+G2Dj/sFYOYsk2pBJGFL35r6Y9Aa5xlO7OsLGgOaN9rHWisE5pK0yjX
sAgQ==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@gcc.gnu.org header.s=default header.b=gNIdoZCZ;
spf=pass (google.com: domain of
gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as
permitted sender)
smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org";
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org
Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97])
by mx.google.com with ESMTPS id
r25-20020aa7c159000000b004ab15f7a4c1si987613edp.124.2023.02.08.09.39.31
for
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 08 Feb 2023 09:39:31 -0800 (PST)
Received-SPF: pass (google.com: domain of
gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as
permitted sender) client-ip=8.43.85.97;
Authentication-Results: mx.google.com;
dkim=pass header.i=@gcc.gnu.org header.s=default header.b=gNIdoZCZ;
spf=pass (google.com: domain of
gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as
permitted sender)
smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org";
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org
Received: from server2.sourceware.org (localhost [IPv6:::1])
by sourceware.org (Postfix) with ESMTP id 015E0383FB9A
for ; Wed, 8 Feb 2023 17:38:52 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 015E0383FB9A
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org;
s=default; t=1675877932;
bh=SyihfsjEll7DxyU8njlrM714NfSJsXgBRbo+CxG/Kg0=;
h=To:Cc:Subject:Date:In-Reply-To:References:List-Id:
List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:
From:Reply-To:From;
b=gNIdoZCZuRnXH7jA26TCmsl8Et4Mv7MrUUW3183lQ4u6dcocFH25nJiwBJDbXU/xU
yfAwOxrpcNpMHO36Zx4kxXKyORuVVHh0bhwguj3E7DYxscSBGXkE/d931rVZ2x/SYE
d99kmk8ZSqYbd0WLejyAEg+ePH7qkpo+iqi31Zvc=
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 D9DD63858C3A
for ; Wed, 8 Feb 2023 17:37:19 +0000 (GMT)
DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org D9DD63858C3A
Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com
[66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS
(version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
us-mta-134-mwiFJt5ZM9-lgPUgEM4z-w-1; Wed, 08 Feb 2023 12:37:18 -0500
X-MC-Unique: mwiFJt5ZM9-lgPUgEM4z-w-1
Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com
[10.11.54.9])
(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
(No client certificate requested)
by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E62C41C3A070
for ; Wed, 8 Feb 2023 17:37:17 +0000 (UTC)
Received: from t14s.localdomain.com (unknown [10.2.16.227])
by smtp.corp.redhat.com (Postfix) with ESMTP id C4097492B01;
Wed, 8 Feb 2023 17:37:17 +0000 (UTC)
To: gcc-patches@gcc.gnu.org
Cc: David Malcolm
Subject: [pushed,
wwwdocs] gcc-13: add SARIF and other diagnostics improvements
Date: Wed, 8 Feb 2023 12:37:09 -0500
Message-Id: <20230208173711.1278104-2-dmalcolm@redhat.com>
In-Reply-To: <20230208173711.1278104-1-dmalcolm@redhat.com>
References: <20230208173711.1278104-1-dmalcolm@redhat.com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
X-Spam-Status: No, score=-11.5 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH,
DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0,
KAM_SHORT,
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+ouuuleilei=gmail.com@gcc.gnu.org
Sender: "Gcc-patches"
X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?=
X-GMAIL-THRID: =?utf-8?q?1757285420094407679?=
X-GMAIL-MSGID: =?utf-8?q?1757285420094407679?=
---
htdocs/gcc-13/changes.html | 30 +++++++++++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/htdocs/gcc-13/changes.html b/htdocs/gcc-13/changes.html
index a48ac220..8c0201f2 100644
--- a/htdocs/gcc-13/changes.html
+++ b/htdocs/gcc-13/changes.html
@@ -128,6 +128,23 @@ a work-in-progress.
will no longer add startup code to alter the floating-point environment
when producing a shared object with -shared
.
+
+ GCC can now emit its diagnostics using SARIF.
+ This is a JSON-based format suited for capturing the results of static
+ analysis tools (like GCC's -fanalyzer
),
+ but it can also be used to capture other GCC warnings and errors in a
+ machine-readable format.
+ Specifically, the -fdiagnostics-format=
+ option has been extended to support these new values:
+
+ -fdiagnostics-format=sarif-stderr
+ -fdiagnostics-format=sarif-file
+ -fdiagnostics-format=json-stderr
, a synonym for the
+ existing -fdiagnostics-format=json
+ -fdiagnostics-format=json-file
+
+ where the json
-prefixed variants refer to GCC's own JSON diagnostic format.
+
@@ -453,7 +470,18 @@ a work-in-progress.
-
+Improvements for plugin authors
+
+
+ - GCC diagnostics can now be
+ associated with rules
+ such as from coding standards documents, or specifications.
+ Such rules have a code name and can have a URL, which GCC can print
+ in text form or capture in its
+ SARIF
+ output when emitting diagnostics.
+
+
Other significant improvements