]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix clang warning in pt.cc
authorMartin Liska <mliska@suse.cz>
Mon, 21 Feb 2022 16:07:17 +0000 (17:07 +0100)
committerMartin Liska <mliska@suse.cz>
Thu, 24 Feb 2022 15:59:01 +0000 (16:59 +0100)
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.

gcc/cp/pt.cc

index 16bedbc4bc7cc0585388abe37ef05487bb3ef990..70f02db8757a069c2cd4af062464d1c52f0ae03a 100644 (file)
@@ -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)