Message ID | 20240712141155.255186-2-parras@baylibre.com |
---|---|
State | Committed |
Commit | 0450a143d2d132a8b3e6cff896f69e191c3316e2 |
Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> 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 3036E3831E17 for <patchwork@sourceware.org>; Fri, 12 Jul 2024 14:13:51 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by sourceware.org (Postfix) with ESMTPS id 88DE838323D1 for <gcc-patches@gcc.gnu.org>; Fri, 12 Jul 2024 14:12:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 88DE838323D1 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=baylibre.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 88DE838323D1 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::231 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720793577; cv=none; b=Kx3RnKHdP2TrdNJ1PVuJ+znB8awVwcl6/JeBNjv435OBCHSjgflz4fH4tgnOLRzP8yADQn7VT8ZWQwfB22n9I6rAJ20W/K3bt1ez2M3N/lR45cRLxILakEg0Zy/6biZuA4taO6OMFwCcjcwfQ9qYt7bHqNHJBqYAnVgpWF+eJUI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1720793577; c=relaxed/simple; bh=EVxwIzUzyYNOh2WgbBrc8m8+9uDcMQANyaChZZ41wHU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=dQ5ndvO40f4vHWZweGlbpnw8Egmwgl4MXGb3WDijEpooG/vvxJvZzpozj4ufgrLmGEX9Agr9ZkS34FrPLq4+XIWfP7EEbb9UsH1bpnDD6sywP1dUmsTmwPxIhC4x8meDqGOKow2TJNNrzfG0pHe2AR2WAfyEqoE3iHldmvJzDSY= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lj1-x231.google.com with SMTP id 38308e7fff4ca-2eabd22d3f4so23180281fa.1 for <gcc-patches@gcc.gnu.org>; Fri, 12 Jul 2024 07:12:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1720793572; x=1721398372; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=IqNaBUfYPX2aUtbDRS0nM7EhKX6Mq0/fd0eiY6ARppY=; b=2wthKW2gKcbLJd5y5a2YplOtDjWZ9uE21dL51utnBsC5AW7Md6btJK8y88VVO+WyDP M5Nib/3XIf+nhiTh1RRSCcEP0EZ4zIGRuda5HmCzQDppf2s+ZgW18+XPFsH2QP9dOoln /7EiYTNLqq6rVjE5n3f83PDCqS+5jk/ezCjFWYHKQBoxFIGfxZaSsFzeuf4Qf2Sn8mn/ aDOM3VhDD1/Z0CEY8rXO4yED/E7dntz3WDbjqngQhV2+xzFn91HcoH06Hs0w/siQKSnC EAvzkcjNfcqosre1PNrpX9dAqdJpGqQCtLZrFE+E13JWZ/UJZ1EqQUNzRR/+lFi0VDfM FHBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720793572; x=1721398372; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=IqNaBUfYPX2aUtbDRS0nM7EhKX6Mq0/fd0eiY6ARppY=; b=DML06Zm/bW5y8513ZFvZsYKLFpMPqn2W7qPtzyrAp+xZr/ey3ZjHLnqrDhx1c1qPSe PAd4dAxg/FfazOKzTguHvX75IK/9Bjpf5sHtGD4p85fVKuYrfKfpU1nmikyx4YJM81AR 8lI/WwzxMFGmtLjqzSDQ6uxvKRXGXROA1DEOfHTKBbQHh8SDPpEfTiOOT5BP85yyphFU 8vE0j30gucArA+fPDhf0gt7JFw9Rm//Ipge4mdB1iau/4LB/6hnWLPLJ2AAggvz5N57F leU06TzaZhEKD7IwrvvqnNyajHjhJPFCNFMStkWMkUrorX9OmC0jP1b47DMAD3VH/4ZP 4Gzw== X-Gm-Message-State: AOJu0YxzjWo7ao2+GNdmkqAo4oacwco9d6MMJADqOfDwa1blokwg3R6S GNXemAc0nSQJ5LxjwTQWAFCR29TFNtjpe4zxQkutY0r1zps0DZHsqMR9UY7mI/bCIQBqIWjjxMK I X-Google-Smtp-Source: AGHT+IFG0lH0pvj9EmjVFuIqyyBtKKXGa21Z3JelZ4qPpwtjHZjqfIMi1kDyoxkVVR2gPRGMotYhyQ== X-Received: by 2002:a2e:bc13:0:b0:2ec:568e:336e with SMTP id 38308e7fff4ca-2eeb30ba026mr88618641fa.1.1720793572263; Fri, 12 Jul 2024 07:12:52 -0700 (PDT) Received: from localhost.localdomain ([169.155.255.128]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4279f25b946sm24680325e9.19.2024.07.12.07.12.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jul 2024 07:12:51 -0700 (PDT) From: Paul-Antoine Arras <parras@baylibre.com> To: gcc-patches@gcc.gnu.org Cc: Paul-Antoine Arras <parras@baylibre.com> Subject: [PATCH v2 1/8] Fix warnings for tree formats in gfc_error Date: Fri, 12 Jul 2024 16:11:48 +0200 Message-ID: <20240712141155.255186-2-parras@baylibre.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240712141155.255186-1-parras@baylibre.com> References: <20240712141155.255186-1-parras@baylibre.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
Series |
OpenMP: dispatch + adjust_args support
|
|
Commit Message
Paul-Antoine Arras
July 12, 2024, 2:11 p.m. UTC
This enables proper warnings for formats like %qD. gcc/c-family/ChangeLog: * c-format.cc (gcc_gfc_char_table): Add formats for tree objects. --- gcc/c-family/c-format.cc | 4 ++++ 1 file changed, 4 insertions(+)
Comments
I think it would be nice if some C/C++/global maintainer could rubber stamp the following patch. Otherwise, I think it is trivial, i.e. I think it can be committed in a few days, unless someone has concerns. This change to gcc/c-family/c-format.cc LGTM from the *gfortran* POV and is trivially copied from gcc_tdiag_char_table or gcc_cdiag_char_table (which both have it). * * * Background: While this is for gcc/c-family/c-format.cc, the 'gcc_gfc_char_table' is for diagnostic for compiling gcc/fortran/, only. Namely, the gfc_error, gfc_warning etc. functions are annotated by the format checking attribute: #define ATTRIBUTE_GCC_GFC(m, n) __attribute__ ((__format__ (__gcc_gfc__, m, n))) ATTRIBUTE_NONNULL(m) * * * As gfc_error etc. call the common diagnostic at the end, '%qE', %qD' etc. are already supported. (As tested manually; it is also used by this patch series of PA.) But while %qE is already supported, without the 'gcc_gfc_char_table' change, the '__format__ (__gcc_gfc__' check does not recognize it and yields a -Werror, causing that a bootstrap fails. Hence, we need this patch … * * * Paul-Antoine Arras wrote: > This enables proper warnings for formats like %qD. > > gcc/c-family/ChangeLog: > > * c-format.cc (gcc_gfc_char_table): Add formats for tree objects. > --- > gcc/c-family/c-format.cc | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/gcc/c-family/c-format.cc b/gcc/c-family/c-format.cc > index 5bfd2fc4469..f4163c9cbc0 100644 > --- a/gcc/c-family/c-format.cc > +++ b/gcc/c-family/c-format.cc > @@ -847,6 +847,10 @@ static const format_char_info gcc_gfc_char_table[] = > /* This will require a "locus" at runtime. */ > { "L", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "R", NULL }, > > + /* These will require a "tree" at runtime. */ > + { "DFTV", 1, STD_C89, { T89_T, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+", "'", NULL }, > + { "E", 1, STD_C89, { T89_T, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+", "", NULL }, > + > /* These will require nothing. */ > { "<>",0, STD_C89, NOARGUMENTS, "", "", NULL }, > { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL
On Fri, Jul 12, 2024 at 04:11:48PM +0200, Paul-Antoine Arras wrote: > This enables proper warnings for formats like %qD. Ok. The new lines are the same as in gcc_cdiag_char_table and gcc_tdiag_char_table. > gcc/c-family/ChangeLog: > > * c-format.cc (gcc_gfc_char_table): Add formats for tree objects. > --- > gcc/c-family/c-format.cc | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/gcc/c-family/c-format.cc b/gcc/c-family/c-format.cc > index 5bfd2fc4469..f4163c9cbc0 100644 > --- a/gcc/c-family/c-format.cc > +++ b/gcc/c-family/c-format.cc > @@ -847,6 +847,10 @@ static const format_char_info gcc_gfc_char_table[] = > /* This will require a "locus" at runtime. */ > { "L", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "R", NULL }, > > + /* These will require a "tree" at runtime. */ > + { "DFTV", 1, STD_C89, { T89_T, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+", "'", NULL }, > + { "E", 1, STD_C89, { T89_T, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+", "", NULL }, > + > /* These will require nothing. */ > { "<>",0, STD_C89, NOARGUMENTS, "", "", NULL }, > { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL } > -- > 2.45.2 > Marek
diff --git a/gcc/c-family/c-format.cc b/gcc/c-family/c-format.cc index 5bfd2fc4469..f4163c9cbc0 100644 --- a/gcc/c-family/c-format.cc +++ b/gcc/c-family/c-format.cc @@ -847,6 +847,10 @@ static const format_char_info gcc_gfc_char_table[] = /* This will require a "locus" at runtime. */ { "L", 0, STD_C89, { T89_V, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "", "R", NULL }, + /* These will require a "tree" at runtime. */ + { "DFTV", 1, STD_C89, { T89_T, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+", "'", NULL }, + { "E", 1, STD_C89, { T89_T, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN, BADLEN }, "q+", "", NULL }, + /* These will require nothing. */ { "<>",0, STD_C89, NOARGUMENTS, "", "", NULL }, { NULL, 0, STD_C89, NOLENGTHS, NULL, NULL, NULL }