From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4691 invoked by alias); 9 May 2012 14:12:38 -0000 Received: (qmail 4679 invoked by uid 22791); 9 May 2012 14:12:37 -0000 X-SWARE-Spam-Status: No, hits=-4.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 May 2012 14:12:19 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1SS7cn-0004nV-0X from Maciej_Rozycki@mentor.com ; Wed, 09 May 2012 07:12:17 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Wed, 9 May 2012 07:12:06 -0700 Received: from [172.30.1.173] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Wed, 9 May 2012 15:12:15 +0100 Date: Wed, 09 May 2012 14:12:00 -0000 From: "Maciej W. Rozycki" To: CC: , , Subject: Re: [RFA] Emit a warning for ineffective set VAR = EXP command In-Reply-To: <46C50B2C-7910-4B36-B64B-D1C6C91627B8@dell.com> Message-ID: References: <8781499A-A489-42D0-80B1-75136331DBDB@adacore.com> <20120507193824.GW15555@adacore.com> <419AD66E-6D21-40D6-97FE-1FF387117B7D@adacore.com> <46C50B2C-7910-4B36-B64B-D1C6C91627B8@dell.com> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2012-05/txt/msg00269.txt.bz2 On Wed, 9 May 2012, Paul_Koning@Dell.com wrote: > >> I think we should avoid the warning for pre/post inc/dec. This > >> type of expression might be a little outside the method proposed > >> in our documentation, but I think it's still a perfectly valid > >> expression that results in an assignment being performed. > > > > I don't know who should approve this adjustment, but here is the version that deals with pre/post inc/dec. > > Note that it still warns for expressions such as i++ * 2. > > If you had it walk through the elts[] list, would it then work for that case? What do you mean by "work" here? I think a warning for "i++ * 2" is expected as that's questionable use -- the result of the multiplication is discarded. Did you mean anything else? I can't approve this change, but it seems OK to me. Maciej