public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-7374] Fix clang warning in pt.cc
@ 2022-02-24 15:59 Martin Liska
  0 siblings, 0 replies; only message in thread
From: Martin Liska @ 2022-02-24 15:59 UTC (permalink / raw)
  To: gcc-cvs

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)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-24 15:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-24 15:59 [gcc r12-7374] Fix clang warning in pt.cc 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).