From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id F3D04388A000 for ; Thu, 2 Apr 2020 12:05:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F3D04388A000 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=segher@kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 032C547n005826; Thu, 2 Apr 2020 07:05:04 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 032C54vt005825; Thu, 2 Apr 2020 07:05:04 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 2 Apr 2020 07:05:04 -0500 From: Segher Boessenkool To: Jakub Jelinek Cc: "Kewen.Lin" , GCC Patches , Bill Schmidt Subject: Re: [PATCH] Fix PR94401 by considering reverse overrun Message-ID: <20200402120504.GC26902@gate.crashing.org> References: <20200402082834.GO2212@tucnak> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200402082834.GO2212@tucnak> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-44.2 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: , X-List-Received-Date: Thu, 02 Apr 2020 12:05:07 -0000 Hi! On Thu, Apr 02, 2020 at 10:28:34AM +0200, Jakub Jelinek wrote: > > + tree offset = dataref_offset > > + ? dataref_offset > > + : build_int_cst (ref_type, 0); > > The above is misformatted. The ? and : shouldn't be indented further than > the dataref_offset, but usually e.g. for the sake of emacs we add ()s around > the expression in this case. So: > tree offset = (dataref_offset > ? dataref_offset > : build_int_cst (ref_type, 0)); > or > tree offset > = (dataref_offset > ? dataref_offset : build_int_cst (ref_type, 0)); Or even just the (less obfuscated imnsho) tree offset = dataref_offset; if (!offset) offset = build_int_cst (ref_type, 0); which even is shorter! Segher