Message ID | 20231104162318.4142088-1-slyich@gmail.com |
---|---|
State | Unresolved |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp1739439vqu; Sat, 4 Nov 2023 09:23:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFzFI9GhTiiE+gHTtyP/eJ26RR3OBCDFLe4AfOzSL5tCVkxghEbVfO3Ud2mbINd342jbTfV X-Received: by 2002:a05:6808:7da:b0:3b2:e292:370 with SMTP id f26-20020a05680807da00b003b2e2920370mr26398706oij.38.1699115027800; Sat, 04 Nov 2023 09:23:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1699115027; cv=pass; d=google.com; s=arc-20160816; b=SVnqBhbFGwRFCMrj2ocq3mpqXXRHm1i57sXvLhtTFmDqRrIuw7N1AAkCL02OTQAA9N a347spOrXjwmXu1q60D/+XPguxEPp3fNzvKWpNpHtWO3gTldlFluP9YsUCtB/btv6AFU XeydFs4kat0VavvvYFyET9JctcMx7W1cVYAEIP0baArJvAD0RD4fa8ePgocyb14D2gUl yl+tpnsGihbSy0qr9194ZT1NTYL2r8KMi+U4R7iaaWtSO/sIopg+XczIyZ05JlClMUvh 4IoJHC03zguEc2eEkcUts7ynRmU7M9N7AFxtETef+j/6aGglkeNKYR8vRE7Plvr47ITN 3Syg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=zVh8freunJe011itgzKth1owxB9WKPyrWCKXNbCZzFY=; fh=AhcG2maQimXqQSGwe8RtsaD8xVfGiWqjPwcfqVdnQuc=; b=rmchVMl0TOsQsXG38qZLQ1XMrEq7yV6I+bzj2JEOOA7Ul47DseSKS5wPgKIJvdcO5m Hsyjj3GIhIk8jRn7AenK8Q9/8iDhGJi7o4YZis3dscQ/zsdLne7Aeb59yORzUiE5QSB2 0exUBy/UxXj8fmBuzkMUyZBuQVUmeBcYfLJIAeN7hXgAAD0XU2fCY84I2Rz7AHKj+Nip 0jn8/QGyccjLh39NiBQkthk/OZ32BXzSiSrMNe5U2I9OedvbHIzz0HJu2SFnnXyfW76l ECQvoliIhHo8lOQQ4E+Jpa41s4zbCcqiiVfFuog+AMrRkNPIB+K4jSgwcSbGhPbdJVUw AD7g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=DtZUcMto; arc=pass (i=1); 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id f2-20020a05620a280200b0077a0cb448a4si3534856qkp.95.2023.11.04.09.23.47 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Nov 2023 09:23:47 -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=@gmail.com header.s=20230601 header.b=DtZUcMto; arc=pass (i=1); 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=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8F9B13858414 for <ouuuleilei@gmail.com>; Sat, 4 Nov 2023 16:23:47 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by sourceware.org (Postfix) with ESMTPS id ECF373858D32 for <gcc-patches@gcc.gnu.org>; Sat, 4 Nov 2023 16:23:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ECF373858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org ECF373858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::432 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699115005; cv=none; b=QDTKnA1X5wDlHeU0wFfed4GgvaUBfA+jbC5s+tJ5YxYbIP2vHMfsl7cUfo5s/yavL0W8irEyskldr8qp1OW7/T4pjIERQLf0WFXX+uNjYMaoZD1EdZHbnW+9Jq25eZ8HV7au6lsCzgATsFG4cUobBH/x77qGoghqBPirRPGoOro= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699115005; c=relaxed/simple; bh=POB47vWOkBlGLLFMK7V5ZAx0rKaLkgOg9II0W8YlvD8=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=whxKsNxEXNQOk/jmCuoz9HjO3LVIlNTvn67u3wfXSZeIg9lRStXq0e/8zhbi6C5lb2KAtpZ1Lk+oI9PjoCdglcHmWMSSFgL35wqYWJjzNoypq65vBbzuib1tvwYdefaH+PMaecSYtiAUk1shBYi1xK+iSCgHnjgyXmIst82baPk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-32d834ec222so1539883f8f.0 for <gcc-patches@gcc.gnu.org>; Sat, 04 Nov 2023 09:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699115002; x=1699719802; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=zVh8freunJe011itgzKth1owxB9WKPyrWCKXNbCZzFY=; b=DtZUcMtoe2tuvjODgHjamQsgXoXTpiS0it8fEvbrPwNogo+bMhqeo9D8JQO6LMJkKl BR36vepLj15iJtV2cfHIc+9ZCNfYUpVww1sUn5GVPnHbDUH16CEeFos6Q+dKjhuE9Wd5 DmHn8RyW4lCtRsdN+OsI0W7JCfw+RkHoO4FWgHAnvieabqB84Wyc6PQcjuWpRXuFE5m2 JwYRWTri4r1QHk4PqRjRAQWZnv76mCPiqAmeqDdxbcrhn/GT+0WV0x47Ix4ww9Vql9iN uEqGBTbxk+XVAg9oKS4yFyfvFjCsA5A0vZNeMFwh6JO6kp0j2Ux7p3PKJuvCQbJWJGRG XhVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699115002; x=1699719802; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zVh8freunJe011itgzKth1owxB9WKPyrWCKXNbCZzFY=; b=PTmrLTqqVbO2WXbVMaNoVOsiEQg93mTIyEtMnF+Y4TRGA24S35iZ2OOuCyxKVDGmCK pmbmUhkG0F4dibt6vzMmtFjqgtn5lNF9019Lo0MdmSQXRzEtNXuqWzxPPbbYVWzFAhvB EpdU+xWR32F6/TZ1/U56w8taUB1JuQck4XpaLyzzINC0ktpjTf4drj6crB6Uk7EjJMH/ Qq9MUizIKRJroSzbJES/ZZto4MYYzmSzYiz/KjFfONdT2vuevunQcEPUCbnEI05VCuMU hC2/zZdhmZIoeu2uP4JRHS8DPOsqGgVgeapxni2H/YwoEe+1uLX+taCgVZOp38e+gzz+ wL3g== X-Gm-Message-State: AOJu0YwNcLKVPvF1d+ikCZNWU1SB+N2IwgKF+OvfPZj0QHCJgeCQhYsu d/R1k15ds5vH3uGN00ixsV5rw7+dHUY= X-Received: by 2002:a5d:4e03:0:b0:32d:83b7:bdb3 with SMTP id p3-20020a5d4e03000000b0032d83b7bdb3mr15331770wrt.70.1699115002014; Sat, 04 Nov 2023 09:23:22 -0700 (PDT) Received: from nz.home ([2a00:23c8:a613:101:729c:d1ff:fe4f:94a3]) by smtp.gmail.com with ESMTPSA id r8-20020adfce88000000b003233b554e6esm3141534wrn.85.2023.11.04.09.23.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 04 Nov 2023 09:23:21 -0700 (PDT) Received: by nz.home (Postfix, from userid 1000) id 2E327127329968; Sat, 4 Nov 2023 16:23:21 +0000 (GMT) From: Sergei Trofimovich <slyich@gmail.com> To: gcc-patches@gcc.gnu.org Cc: David Malcolm <dmalcolm@redhat.com>, Sergei Trofimovich <slyich@gmail.com>, Sergei Trofimovich <siarheit@google.com> Subject: [PATCH] diagnostics: fix gcc-urlifier.cc bootstrap failure [PR112379] Date: Sat, 4 Nov 2023 16:23:18 +0000 Message-ID: <20231104162318.4142088-1-slyich@gmail.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781651239368344924 X-GMAIL-MSGID: 1781651239368344924 |
Series |
diagnostics: fix gcc-urlifier.cc bootstrap failure [PR112379]
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | warning | Git am fail log |
Commit Message
Sergei Trofimovich
Nov. 4, 2023, 4:23 p.m. UTC
From: Sergei Trofimovich <siarheit@google.com>
Without the change `./configure --enable-checking=release` bootstrap
fails as:
gcc/gcc-urlifier.cc:100:1: error: 'get_url_suffix_for_quoted_text()'
defined but not used [-Werror=unused-function]
This happens because the helper is used only in `ASSERT` macros which
don't always get expanded to executable code.
The fix marks helper function with `ATTRIBUTE_UNUSED`.
gcc/
PR bootstrap/112379
* gcc-urlifier.cc (get_url_suffix_for_quoted_text): Mark as
ATTRIBUTE_UNUSED.
---
gcc/gcc-urlifier.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
Comments
On Sat, 2023-11-04 at 16:23 +0000, Sergei Trofimovich wrote: > From: Sergei Trofimovich <siarheit@google.com> > > Without the change `./configure --enable-checking=release` bootstrap > fails as: > > gcc/gcc-urlifier.cc:100:1: error: > 'get_url_suffix_for_quoted_text()' > defined but not used [-Werror=unused-function] > > This happens because the helper is used only in `ASSERT` macros which > don't always get expanded to executable code. > > The fix marks helper function with `ATTRIBUTE_UNUSED`. Sorry for the breakage. Patch looks good to me; thanks Dave > > gcc/ > PR bootstrap/112379 > * gcc-urlifier.cc (get_url_suffix_for_quoted_text): Mark as > ATTRIBUTE_UNUSED. > --- > gcc/gcc-urlifier.cc | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gcc/gcc-urlifier.cc b/gcc/gcc-urlifier.cc > index 269246bc703..0dbff985313 100644 > --- a/gcc/gcc-urlifier.cc > +++ b/gcc/gcc-urlifier.cc > @@ -37,7 +37,8 @@ public: > char *get_url_for_quoted_text (const char *p, size_t sz) const > final override; > > const char *get_url_suffix_for_quoted_text (const char *p, size_t > sz) const; > - const char *get_url_suffix_for_quoted_text (const char *p) const; > + /* We use ATTRIBUTE_UNUSED as this helper is called only from > ASSERTs. */ > + const char *get_url_suffix_for_quoted_text (const char *p) const > ATTRIBUTE_UNUSED; > > private: > static char *
diff --git a/gcc/gcc-urlifier.cc b/gcc/gcc-urlifier.cc index 269246bc703..0dbff985313 100644 --- a/gcc/gcc-urlifier.cc +++ b/gcc/gcc-urlifier.cc @@ -37,7 +37,8 @@ public: char *get_url_for_quoted_text (const char *p, size_t sz) const final override; const char *get_url_suffix_for_quoted_text (const char *p, size_t sz) const; - const char *get_url_suffix_for_quoted_text (const char *p) const; + /* We use ATTRIBUTE_UNUSED as this helper is called only from ASSERTs. */ + const char *get_url_suffix_for_quoted_text (const char *p) const ATTRIBUTE_UNUSED; private: static char *