From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28925 invoked by alias); 7 May 2012 19:38:43 -0000 Received: (qmail 28917 invoked by uid 22791); 7 May 2012 19:38:42 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 07 May 2012 19:38:30 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id BE9111C6C2C; Mon, 7 May 2012 15:38:29 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id NeL2Q5gB0HYd; Mon, 7 May 2012 15:38:29 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 6EB881C62E6; Mon, 7 May 2012 15:38:29 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id B5EDC145616; Mon, 7 May 2012 12:38:24 -0700 (PDT) Date: Mon, 07 May 2012 19:38:00 -0000 From: Joel Brobecker To: Tristan Gingold Cc: "Maciej W. Rozycki" , "gdb-patches@sourceware.org ml" Subject: Re: [RFA] Emit a warning for ineffective set VAR = EXP command Message-ID: <20120507193824.GW15555@adacore.com> References: <8781499A-A489-42D0-80B1-75136331DBDB@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.20 (2009-06-14) 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/msg00190.txt.bz2 > > This warns about "set variable $j++" presumably -- should the warning be > > disabled for pre/post increments/decrements? > > I am not opposed to disable warnings for pre/post inc/dec. > But this usage is dubious (the help explicitly mentions VAR=EXP !) > > Opinion ? 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. -- Joel