From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9299 invoked by alias); 9 May 2012 15:55:54 -0000 Received: (qmail 9287 invoked by uid 22791); 9 May 2012 15:55:52 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from ausxippc101.us.dell.com (HELO ausxippc101.us.dell.com) (143.166.85.207) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 09 May 2012 15:55:39 +0000 X-Loopcount0: from 10.175.216.249 From: To: CC: , , Subject: Re: [RFA] Emit a warning for ineffective set VAR = EXP command Date: Wed, 09 May 2012 15:55:00 -0000 Message-ID: <9E762D6B-AB48-4D91-B33F-2C7E6078C5BE@Dell.com> 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> In-Reply-To: Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes 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/msg00278.txt.bz2 On May 9, 2012, at 11:38 AM, Maciej W. Rozycki wrote: > On Wed, 9 May 2012, Paul_Koning@Dell.com wrote: >=20 >>> What do you mean by "work" here? I think a warning for "i++ * 2" is=20 >>> expected as that's questionable use -- the result of the multiplication= is=20 >>> discarded. Did you mean anything else? >>=20 >> You're right, but it does perform an assignment (to "i") so a message=20 >> saying that the statement has no effect is not accurate. Then again,=20 >> given that the statement doesn't make much sense, the fact that the=20 >> message is not completely accurate isn't all that interesting -- unlike= =20 >> the simple "i++" it isn't a likely case in reality. >=20 > I think it's all right -- "might have no effect" is weaker than "has no=20 > effect" and will draw one's attention in the case of a typo or suchlike. >=20 > Maciej Good point. So I'll agree that the proposed change is fine (and no, I can'= t approve it either). paul