From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 79369 invoked by alias); 23 Sep 2018 06:57:29 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 79341 invoked by uid 89); 23 Sep 2018 06:57:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,KAM_SHORT,SPF_PASS autolearn=ham version=3.3.2 spammy=HContent-Transfer-Encoding:8bit X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 23 Sep 2018 06:57:24 +0000 Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id C7823AF0C; Sun, 23 Sep 2018 06:57:21 +0000 (UTC) Subject: Re: [PATCH] Cleanup strcpy/stpcpy no nul warning code From: =?UTF-8?Q?Martin_Li=c5=a1ka?= To: Jeff Law , Bernd Edlinger , "gcc-patches@gcc.gnu.org" , Richard Biener , Martin Sebor References: <197bea85-950d-3e06-d0fe-e1cffa8e78cd@redhat.com> <469fc374-4dc5-e279-c08c-39ec2240b059@redhat.com> <1434c397-fa9d-a439-9ed3-07e96cf374d1@redhat.com> <92223083-70be-f2db-a589-362125c49b09@suse.cz> Message-ID: <666b03df-fe1d-7c85-5c3b-3eb720f50c3e@suse.cz> Date: Sun, 23 Sep 2018 08:49:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <92223083-70be-f2db-a589-362125c49b09@suse.cz> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg01293.txt.bz2 On 9/22/18 8:32 PM, Martin Liška wrote: > Hi Jeff. > > I noticed that your commit r264328 introduced this: > > gcc/builtins.c: > ... >    579        tree rhs1 = gimple_assign_rhs1 (stmt); >    580        tree_code code = gimple_assign_rhs_code (stmt); >    581        if (code == ADDR_EXPR >    582            && TREE_CODE (TREE_OPERAND (rhs1, 0)) == ARRAY_REF) >    583          rhs1 = rhs1; <---- here >    584        else if (code != POINTER_PLUS_EXPR) >    585          return NULL_TREE; > ... > > which is reported by LLVM as warning: > gcc/builtins.c:583:2:Semantic Issue: explicitly assigning value of variable of type 'tree' (aka 'tree_node *') to itself: -Wself-assign > > Can you please fix that? > Thanks, > Martin Apparently the same was already reported here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87387 Martin