From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18837 invoked by alias); 9 May 2012 15:38:49 -0000 Received: (qmail 18734 invoked by uid 22791); 9 May 2012 15:38:47 -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 15:38:31 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1SS8yD-0006iZ-Qt from Maciej_Rozycki@mentor.com ; Wed, 09 May 2012 08:38:29 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Wed, 9 May 2012 08:38:29 -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 16:38:27 +0100 Date: Wed, 09 May 2012 15:38:00 -0000 From: "Maciej W. Rozycki" To: CC: , , Subject: Re: [RFA] Emit a warning for ineffective set VAR = EXP command In-Reply-To: <4B067100-86F0-4977-A6DC-CECB3F7C8B05@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> <4B067100-86F0-4977-A6DC-CECB3F7C8B05@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/msg00275.txt.bz2 On Wed, 9 May 2012, Paul_Koning@Dell.com wrote: > > 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? > > You're right, but it does perform an assignment (to "i") so a message > saying that the statement has no effect is not accurate. Then again, > given that the statement doesn't make much sense, the fact that the > message is not completely accurate isn't all that interesting -- unlike > the simple "i++" it isn't a likely case in reality. I think it's all right -- "might have no effect" is weaker than "has no effect" and will draw one's attention in the case of a typo or suchlike. Maciej