[gcc r12-7374] Fix clang warning in pt.cc
Martin Liska
marxin@gcc.gnu.org
Thu Feb 24 15:59:35 GMT 2022
https://gcc.gnu.org/g:029851fe7092e0d5bd757f51cca4ce6467795f5c
commit r12-7374-g029851fe7092e0d5bd757f51cca4ce6467795f5c
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