From patchwork Wed Sep 21 09:39:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 1338 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2302:b0:79:6ae5:3758 with SMTP id gv2csp2717214dyb; Wed, 21 Sep 2022 02:40:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM624D91QIUh2J68In2Irq2tHv7V7DJcWEqqpuYyMTRDkTnQ1/AZkXD+o6E3/UqDYafbQBEJ X-Received: by 2002:a17:906:6a07:b0:77d:f99c:5ab8 with SMTP id qw7-20020a1709066a0700b0077df99c5ab8mr20315552ejc.544.1663753213593; Wed, 21 Sep 2022 02:40:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663753213; cv=none; d=google.com; s=arc-20160816; b=cu8zrBOSuTP71Y8HMuB3uKlZDUM3MVe8uJnY2m93nouYwGA5e0QhZVaeowDDv23QBH 52YuYdc8xdw8b/WvEEZS1e/HQ4F9OmIoOUafdg16P05e5fhZVvMIw94gG0X6uVTA1gpe gzM1xYXDuQ/xdTbeJxc1hrm5DB8RQ086SmYpCny52POg/3bMRCDkjK5O2HHpe1wo84mU xU1XGkabq2IDm/IVyNUuKP+3jjGIVaTgBptF0QM66seP+bTnwEexlL2jRMaZQs4IWyx5 /cVpxaQ29n/JlCoCBKPTWGDd33EK32lsJKSDWujJrnyQ4T1JqHe3TXM9qG5/d2ndY89j EvVA== 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:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=dvCXeeERVKUOFrvze0QTYqhVS/gH6Ey/w+aNCmMrJGE=; b=qvlRaKUsEBVODspqA7bnPEvhzLC89BXY6qrgq8X6Ci4zrDTeGklI2DaATGboy3yfRm 20/pyBXDZziAF0WpNSqo9W5eCGkCX8lat9byew9QKXbep+b5pbFq5m9OfdyRo+KWoKi3 062icIOHA5umJTywB10V+6Uk5W1tuKySQI6eezd38QY7N5hxCqFo3N3t8j++maIMLUgp ykjiJ6RF/jZ59LP3GFDBHHHGWq/dIPEWR+JzpXqmQkePqaV2hmcUI5vcGbVjwAvJFiFS 0zh0Zds4JQVEkZJjyWnH0W2Iyix7n4kD2FnZbbyMYnBZbvFDuThHq3PJAogvMPGcs5Qn gLHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=jctOLLH3; 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 s1-20020a508d01000000b0044f0eedd1d7si2050860eds.438.2022.09.21.02.40.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Sep 2022 02:40:13 -0700 (PDT) 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=jctOLLH3; 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 839FB385842E for ; Wed, 21 Sep 2022 09:40:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 839FB385842E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663753212; bh=dvCXeeERVKUOFrvze0QTYqhVS/gH6Ey/w+aNCmMrJGE=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=jctOLLH3jlydGDn7QEVbq5RErnfEFEnlbqwOvZ2wxHMMH7A6nhFaDldXNGek7cMVx /PZ8sS063ns1wt/yEx6XlzHGyPR9Rt3oYUP+G/rjsZrrsKMZL0pePcnkw7Fm1Pub9s I0zeboqFE94/i4V99qmMT4AWzgWPesOqfSbihwgQ= 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 89A4D3858D37 for ; Wed, 21 Sep 2022 09:39:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 89A4D3858D37 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-654-uYT2Eo-KPRqPWwuxWXtqeA-1; Wed, 21 Sep 2022 05:39:28 -0400 X-MC-Unique: uYT2Eo-KPRqPWwuxWXtqeA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E4DA8811E81 for ; Wed, 21 Sep 2022 09:39:27 +0000 (UTC) Received: from localhost (unknown [10.33.36.214]) by smtp.corp.redhat.com (Postfix) with ESMTP id ADDEF40C2064 for ; Wed, 21 Sep 2022 09:39:27 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [wwwdocs] Add reference to pp_format to Coding Conventions Date: Wed, 21 Sep 2022 10:39:27 +0100 Message-Id: <20220921093927.870907-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-12.3 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_LOW, 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: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely 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?1744571689979846363?= X-GMAIL-MSGID: =?utf-8?q?1744571689979846363?= Finding the docs for the GCC-specific diagnostic formats isn't easy. This might help. OK for wwwdocs? --- htdocs/codingconventions.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/codingconventions.html b/htdocs/codingconventions.html index e4d30510..f1d1f165 100644 --- a/htdocs/codingconventions.html +++ b/htdocs/codingconventions.html @@ -333,7 +333,8 @@ code token.
  • Diagnostics using the GCC diagnostic functions should generally use the GCC-specific formats such as %qs or %< and %> for quoting and -%m for errno numbers.
  • +%m for errno numbers. See +pp_format in pretty-print.cc for supported formats.
  • Identifiers should generally be formatted with %E or %qE; use of identifier_to_locale is needed