public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-504] opts-global.cc: document last change
@ 2022-05-16 9:09 Martin Liska
0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-05-16 9:09 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:8ab53e65a60cc151ff9b5b48c749d40e0bd58756
commit r13-504-g8ab53e65a60cc151ff9b5b48c749d40e0bd58756
Author: Martin Liska <mliska@suse.cz>
Date: Mon May 16 11:07:57 2022 +0200
opts-global.cc: document last change
gcc/ChangeLog:
* opts-global.cc (write_langs): Add comment.
Diff:
---
gcc/opts-global.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/opts-global.cc b/gcc/opts-global.cc
index 4f5f8cdcb98..4355e26747a 100644
--- a/gcc/opts-global.cc
+++ b/gcc/opts-global.cc
@@ -61,6 +61,8 @@ write_langs (unsigned int mask)
if (mask & (1U << n))
len += strlen (lang_name) + 1;
+ /* Allocate at least one character as we'll terminate the string
+ at the very end of this function. */
result = XNEWVEC (char, MAX (1, len));
len = 0;
for (n = 0; (lang_name = lang_names[n]) != 0; n++)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-16 9:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-16 9:09 [gcc r13-504] opts-global.cc: document last change Martin Liska
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).