From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id DEE1F3858C83 for ; Thu, 22 Sep 2022 11:22:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DEE1F3858C83 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663845735; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=wOIM7wqXMnj9inxu2LjmESA+84aBb5gMGbMyl/JC9Sk=; b=JaBPTUsdiDHv/Q8Wm3AJre8SZdMkJWCWLIflTMalEu9UpxRdVMCFIgJ8L0/5Fjl/2j92XP ilLzKSF07RD14XYFbEmBCyRiTy1BmnKoL2L8GII1FuP7qVMUhw5Gc6E6k8Oqt3NyqG+fiE E7BObBXhOh/H5JAVawkOfK6hrT9cz8Q= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-106-3-Y2Q2laOvyAnulvGV6vIQ-1; Thu, 22 Sep 2022 07:22:12 -0400 X-MC-Unique: 3-Y2Q2laOvyAnulvGV6vIQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E8BDF3C1068E for ; Thu, 22 Sep 2022 11:22:11 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.194]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A8D89111F3C1; Thu, 22 Sep 2022 11:22:11 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 28MBM9Ec2546961 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 22 Sep 2022 13:22:09 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 28MBM8c72546960; Thu, 22 Sep 2022 13:22:08 +0200 Date: Thu, 22 Sep 2022 13:22:08 +0200 From: Jakub Jelinek To: David Malcolm Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] c: fix uninitialized c_expr::m_decimal [PR106830] Message-ID: Reply-To: Jakub Jelinek References: <20220907012047.425066-1-dmalcolm@redhat.com> MIME-Version: 1.0 In-Reply-To: <20220907012047.425066-1-dmalcolm@redhat.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, Sep 06, 2022 at 09:20:47PM -0400, David Malcolm via Gcc-patches wrote: > I added c_expr::m_decimal in r13-2386-gbedfca647a9e9c1a as part of the > implementation of -Wxor-used-as-pow, but I missed various places where > the field needed to be initialized. > > Fixed thusly (based on searching for places that assign to > the original_code field). > > Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. > > OK for trunk? > > Thanks > Dave > > > gcc/c-family/ChangeLog: > PR c/106830 > * c-warn.cc (check_for_xor_used_as_pow): Don't try checking > values that don't fit in uhwi. > > gcc/c/ChangeLog: > PR c/106830 > * c-parser.cc (c_parser_initelt): Initialize m_decimal. > (c_parser_cast_expression): Likewise. > (c_parser_alignof_expression): Likewise. > (c_parser_postfix_expression_after_paren_type): Likewise. > (c_parser_postfix_expression_after_primary): Likewise. > (c_parser_expression): Likewise. > (c_parser_omp_variable_list): Likewise. > (c_parser_transaction_expression): Likewise. > * c-tree.h (c_expr::set_error): Likewise. > * c-typeck.cc (c_expr_sizeof_expr): Likewise. > (parser_build_unary_op): Likewise. > (parser_build_binary_op): Likewise. > (digest_init): Likewise. > (pop_init_level): Likewise. > * gimple-parser.cc (c_parser_gimple_call_internal): Likewise. > > gcc/testsuite/ChangeLog: > PR c/106830 > * gcc.dg/Wxor-used-as-pow-pr106830.c: New test. Ok, thanks. Jakub