From patchwork Mon Feb 21 16:48:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 1595684 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.cz header.i=@suse.cz header.a=rsa-sha256 header.s=susede2_rsa header.b=SwmB1qv1; dkim=fail reason="signature verification failed" header.d=suse.cz header.i=@suse.cz header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=YDgPRsRc; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K2Sts4gTXz9sGP for ; Tue, 22 Feb 2022 03:49:07 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C433E385DC3D for ; Mon, 21 Feb 2022 16:49:05 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id DA5AF3858410 for ; Mon, 21 Feb 2022 16:48:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DA5AF3858410 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 9964C1F391; Mon, 21 Feb 2022 16:48:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1645462121; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ha6KCsvfHzC2vVZnWvVhzbYlZddDa0wdGKCQSpUhj1c=; b=SwmB1qv15ssSsuE9RBXgwLCfWwSNSQKlnYqKszqYxNZnv2uW74KL8/sF95/rkEDCgYVHXY 0U5uteve4Zy22dr5YjGfpvGm5vMYQjE7ntdk0D4s7TwybKehj/ay/MIiiJgKJCH0tYd+AQ Z7XpBlnp9aunLGK/+Zz2dlVcdkOx2/w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1645462121; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ha6KCsvfHzC2vVZnWvVhzbYlZddDa0wdGKCQSpUhj1c=; b=YDgPRsRcDprwHNEKZ599MBVRjWhIZtlC0+VcuePu81n2P3NxysUaWu4OPn4lz/uwEwFanf jH1BUlE7AfkwAXBQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 8258413B52; Mon, 21 Feb 2022 16:48:41 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id LQiLHmnCE2JYcQAAMHmgww (envelope-from ); Mon, 21 Feb 2022 16:48:41 +0000 Message-ID: <859db331-d123-c872-a7b8-61864674bcf8@suse.cz> Date: Mon, 21 Feb 2022 17:48:41 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH] Fix clang warning in pt.cc To: gcc-patches@gcc.gnu.org Content-Language: en-US X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" Fixes: gcc/cp/pt.cc:13755:23: warning: suggest braces around initialization of subobject [-Wmissing-braces] tree_vec_map in = { fn, nullptr }; Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/cp/ChangeLog: * pt.cc (defarg_insts_for): Use braces for subobject. --- 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::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)