Message ID | 20231218034422.2668628-2-syq@gcc.gnu.org |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1010682dyi; Sun, 17 Dec 2023 19:45:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IHI8YY7YauaehXqCBQmpVVnyofaYvJKgzq91PJabHdZo/fs4RbcfCzt4MssxeRppUBLF/0b X-Received: by 2002:a05:620a:47f0:b0:780:f04a:7256 with SMTP id du48-20020a05620a47f000b00780f04a7256mr63415qkb.89.1702871141354; Sun, 17 Dec 2023 19:45:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1702871141; cv=pass; d=google.com; s=arc-20160816; b=h41Xi7zs1JL0uVk1aPJQzmRochDH6rGVO90oBwqx0g36F4+nnJkcji/FuzAnORH9ke 0BL07AYYHznlgcPTF6Q1aiZPAgEQOeQhOsfHbQ3QxR1D1+AYlaxrxTVpVV5dP3HbtKVA byP/BMJdFhxpdZ1+lruiCJ2rNNrTMt94lxx5p4xI2rFMp97Gm/iuuLNrRBeZGFIP6xyC qc2dzklSZv1eXmdMq4dq8m7gSq7vqTRHcveXZWWdJlKT6OBQQXJrLEjmQ/I2QZOU/+6+ NOPVRMXw6xYDz9rXaC5v2xUar7UjA+ZaOn7wzmuQqSoWNiyZtRrORX/99bCqWmQESfSI Y2dA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:arc-filter:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=SoONzDYY10qxtxbSNNrgdXJL5hd1Fw5SVgHN0Ww2j1I=; fh=iPK9VFzDctRvhg/CvdKnDq7BdjDrDrHSgrGyn/rFqu8=; b=dbAwGyCcxWnfqoX6+NaQwPLSPNO49lv9oQWr1u13H9fS25U40dpu0NFAwO6OCNRbwm RLIRjkRp+9Iz0tPwE0gPB0xHWeA8jJn1syoP2SnR50JBl/ZOfK14reB4bxjJEWL5gfx4 gJ2dzM2aNWfTTs51qAGOHa1pL7mMacIDs0q02ri9qsiZIhCbxh7P2U6QTx6/DgEWZ2ec gx90JRcifXXttvMDDUCMISMKxMC5rX6wRlqrCJmDg7nUyqcYIywAm2/q/NxlXrEMT1U4 /CoxT7qkH651/d4eLV9Cgt2hNMMVir+Ke+vrLlgMD8rqMtIVd1PlA9iquLcPIKYNRJiy Ek0g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b="Y1O5/pXo"; 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=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id q26-20020a05620a039a00b0077437335298si22081587qkm.765.2023.12.17.19.45.41 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 19:45:41 -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="Y1O5/pXo"; 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=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0DC3F385803E for <ouuuleilei@gmail.com>; Mon, 18 Dec 2023 03:45:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0DC3F385803E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1702871141; bh=SoONzDYY10qxtxbSNNrgdXJL5hd1Fw5SVgHN0Ww2j1I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Y1O5/pXo4tFUcrYaFOCcYdakBqfGzqBfVbVpCVzAbswaNLzbfR4suXLDSic9rDnoV OmpyRuKRfEcBWR3V+MQzXpbmkiYGxqLI4gMCnYgY26nFDEvFlGpOvRWWSmNPFubrwM WV/gSsKkab0863DG++azMZt5hVTC9lb7A3T9hdus= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-oa1-f52.google.com (mail-oa1-f52.google.com [209.85.160.52]) by sourceware.org (Postfix) with ESMTPS id 551793857C4F; Mon, 18 Dec 2023 03:44:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 551793857C4F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 551793857C4F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=209.85.160.52 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702871098; cv=none; b=FAfsl+gnuAPjqcV4DV0lnY6wIUS+13wfd1LLn8rAlsMPc+O496ucjHgchgMnsG4sIhxYQ6BvsYBdxCSBlv+XCmnjNHlUGl18mbCpdxzi/7l8bf+QFHlq+0ANeJO1QLkmMjrFzwj09SEnDLLKW3hOX48JJKpeN9kI1CXavU7SlYA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702871098; c=relaxed/simple; bh=eyUME1gSALh9oKzk3yb5bgZrf1NonWWQlzsTWcl2WjI=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=CNVjpDVJbPp3eQ/Kxn5ZdBGh1hj+6Prus51tFDHzfvED2HRETafxkQ2+tBx58tkbIIpzc1MnsU924cdgbwQMotib4ZbHOWT4zM22knGu4iKFoiznO8WihZ1xLzytFLd1hpR3qUM9atU4yujiaTCOuxAhCRgphPFsc5hqqM0CISk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oa1-f52.google.com with SMTP id 586e51a60fabf-1f5bd86ceb3so2011773fac.2; Sun, 17 Dec 2023 19:44:57 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702871096; x=1703475896; 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=SoONzDYY10qxtxbSNNrgdXJL5hd1Fw5SVgHN0Ww2j1I=; b=wlOnFjJFQlZL/lM5fiPoAcHgNZ5CPmketbqh3GOcq9F6wpYpiVPLfBsyyj+FX010A7 KXjo234V7lfzB/Qk3zqGOYKr57VDin5cVR3hbi7agIw19syNNMkDoUHXt8pQTaX9Bg02 zEcrQIJT3m5xdvRuQP/XFwV0J1dxyC6Qxly+tJqfEQ1F27cImuTGTKt+9NA9zBRACR6C H5DDG95RF8/O0SP8fSJMb0UHnLZMR5RhsBGrKj/obM0/GucHM11BRSkmxAG3IDm87sel Ymv3PN2M9QzuMYsoC7IwNZ/b+hmXeZDDMxN6O82Vldvl3QCkXe7VpewoyOjpEpEueV3K fv7Q== X-Gm-Message-State: AOJu0Yzv27XTPxV3HZvvXs0YJX1dDfn/zur4P93fjZHamG2oq5IRdXIy f0d+VFk31krBh5S8ABV1KWz2Tn4fgxnaCeax X-Received: by 2002:a05:6358:724e:b0:16e:2898:5de4 with SMTP id i14-20020a056358724e00b0016e28985de4mr18511759rwa.6.1702871096125; Sun, 17 Dec 2023 19:44:56 -0800 (PST) Received: from localhost.localdomain ([149.248.38.156]) by smtp.gmail.com with ESMTPSA id 14-20020a17090a19ce00b0028b92b6c657sm431692pjj.2.2023.12.17.19.44.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Dec 2023 19:44:55 -0800 (PST) From: YunQiang Su <syq@gcc.gnu.org> To: gcc-patches@gcc.gnu.org Cc: ian@airs.com, pinskia@gmail.com, matoro_mailinglist_gcc-patches@matoro.tk, jakub@redhat.com, YunQiang Su <syq@gcc.gnu.org> Subject: [PATCH 2/2] libiberty/reconcat: Add note about append string to NULL Date: Mon, 18 Dec 2023 11:44:22 +0800 Message-Id: <20231218034422.2668628-2-syq@gcc.gnu.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231218034422.2668628-1-syq@gcc.gnu.org> References: <20231218034422.2668628-1-syq@gcc.gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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: 1785589809542071058 X-GMAIL-MSGID: 1785589809542071058 |
Series |
[1/2] MIPS: host_detect_local_cpu, init ret with concat [PR112759]
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
YunQiang Su
Dec. 18, 2023, 3:44 a.m. UTC
For reconcat, if the `optr` can only be used as the last one of string list, aka, we cannot append something to it. Let's add some note into the document. libiberty: * concat.c (reconcat): Add note about append string to NULL into document. --- libiberty/concat.c | 3 +++ 1 file changed, 3 insertions(+)
Comments
On Mon, Dec 18, 2023 at 11:44:22AM +0800, YunQiang Su wrote: > For reconcat, if the `optr` can only be used as the last one > of string list, aka, we cannot append something to it. > Let's add some note into the document. > > libiberty: > * concat.c (reconcat): Add note about append string to NULL > into document. > --- > libiberty/concat.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/libiberty/concat.c b/libiberty/concat.c > index 4cb1df3baf3..3a6b4ca71e8 100644 > --- a/libiberty/concat.c > +++ b/libiberty/concat.c > @@ -169,6 +169,9 @@ loop: > str = reconcat (str, "pre-", str, NULL); > @end example > > +Note: don't try to append string(s) to the a NULL string, > +as the process will stop at the first NULL argument. > + > @end deftypefn I think this is unnecessary and misleading. The fact that NULL is the variable argument terminator is already clearly documented, and first argument to reconcat can be NULL just fine, so one just needs to be careful. Jakub
diff --git a/libiberty/concat.c b/libiberty/concat.c index 4cb1df3baf3..3a6b4ca71e8 100644 --- a/libiberty/concat.c +++ b/libiberty/concat.c @@ -169,6 +169,9 @@ loop: str = reconcat (str, "pre-", str, NULL); @end example +Note: don't try to append string(s) to the a NULL string, +as the process will stop at the first NULL argument. + @end deftypefn */