projects
/
platform
/
upstream
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cc7cd8d
)
opts-global.cc: document last change
author
Martin Liska
<mliska@suse.cz>
Mon, 16 May 2022 09:07:57 +0000
(11:07 +0200)
committer
Martin Liska
<mliska@suse.cz>
Mon, 16 May 2022 09:07:57 +0000
(11:07 +0200)
gcc/ChangeLog:
* opts-global.cc (write_langs): Add comment.
gcc/opts-global.cc
patch
|
blob
|
history
diff --git
a/gcc/opts-global.cc
b/gcc/opts-global.cc
index
4f5f8cd
..
4355e26
100644
(file)
--- 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++)