[gcc(refs/users/marxin/heads/pt.cc-clang-warning)] Fix clang warning in pt.cc
Martin Liska
marxin@gcc.gnu.org
Mon Feb 21 16:08:12 GMT 2022
https://gcc.gnu.org/g:29df198321eb28809bfe9882e14f93d3a453147c
commit 29df198321eb28809bfe9882e14f93d3a453147c
Author: Martin Liska <mliska@suse.cz>
Date: Mon Feb 21 17:07:17 2022 +0100
Fix clang warning in pt.cc
Fixes:
gcc/cp/pt.cc:13755:23: warning: suggest braces around initialization of subobject [-Wmissing-braces]
tree_vec_map in = { fn, nullptr };
gcc/cp/ChangeLog:
* pt.cc (defarg_insts_for): Use braces for subobject.
Diff:
---
gcc/cp/pt.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
index 16bedbc4bc7..70f02db8757 100644
--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -13752,7 +13752,7 @@ defarg_insts_for (tree fn)
{
if (!defarg_inst)
defarg_inst = hash_table<tree_vec_map_cache_hasher>::create_ggc (13);
- tree_vec_map in = { fn, nullptr };
+ tree_vec_map in = { { fn }, nullptr };
tree_vec_map **slot
= defarg_inst->find_slot_with_hash (&in, DECL_UID (fn), INSERT);
if (!*slot)
More information about the Gcc-cvs
mailing list