From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13714 invoked by alias); 25 Nov 2003 18:42:47 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 13697 invoked from network); 25 Nov 2003 18:42:44 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 25 Nov 2003 18:42:44 -0000 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id B229A2B8F; Tue, 25 Nov 2003 13:42:33 -0500 (EST) Message-ID: <3FC3A299.90005@gnu.org> Date: Tue, 25 Nov 2003 18:42:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: David Carlton , Eli Zaretskii , gdb-patches@sources.redhat.com Subject: Re: [commit] Deprecate remaining STREQ uses References: <3FC119EB.1060102@gnu.org> <3FC234C0.1000500@gnu.org> <2914-Mon24Nov2003212333+0200-eliz@elta.co.il> <3FC39747.2090007@gnu.org> <20031125175721.GA19157@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-11/txt/msg00573.txt.bz2 >> You'll now appreciate my paranoia :-) >> >> So, should the transformation be the strictly mechanical inline expansion: >> >> STREQ(a,b) => (*(a) == *(b) ? !strcmp ((a), (b)) : 0) >> >> or also include a simplification leading to: >> >> STREQ(a,b) => (strcmp ((a), (b)) == 0) > > > Personally, I recommend the latter - I think part of the motivation for > eliminating STREQ was to get rid of that extra test, right? If you > want to do this mechanically, you can just change the definition of > STREQ first, of course. My question is somewhat retorical. I'd expect everyone to express a preference for the latter. What's needed is for people to recognize that such a transformation could potentially alter the program's behavior. It shouldn't but if it does it's not my fault. Andrew