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 [thread overview]
Message-ID: <20231218034422.2668628-2-syq@gcc.gnu.org> (raw)
In-Reply-To: <20231218034422.2668628-1-syq@gcc.gnu.org>
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
*/
--
2.39.2
next prev parent reply other threads:[~2023-12-18 3:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-18 3:44 [PATCH 1/2] MIPS: host_detect_local_cpu, init ret with concat [PR112759] YunQiang Su
2023-12-18 3:44 ` YunQiang Su [this message]
2023-12-18 7:56 ` [PATCH 2/2] libiberty/reconcat: Add note about append string to NULL Jakub Jelinek
2023-12-18 8:10 ` [PATCH 1/2] MIPS: host_detect_local_cpu, init ret with concat [PR112759] Jakub Jelinek
2023-12-18 22:59 ` YunQiang Su
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231218034422.2668628-2-syq@gcc.gnu.org \
--to=syq@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=ian@airs.com \
--cc=jakub@redhat.com \
--cc=matoro_mailinglist_gcc-patches@matoro.tk \
--cc=pinskia@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).