From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25918 invoked by alias); 23 May 2003 21:46:02 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 19994 invoked from network); 23 May 2003 21:43:11 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.131) by sources.redhat.com with SMTP; 23 May 2003 21:43:11 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 1F90F2B2F; Fri, 23 May 2003 17:43:03 -0400 (EDT) Message-ID: <3ECE95E6.7020100@redhat.com> Date: Fri, 23 May 2003 21:46:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: David Carlton Cc: "Theodore A. Roth" , gdb@sources.redhat.com Subject: Re: suggested compile warnings References: <3ECE817C.1020900@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-05/txt/msg00328.txt.bz2 > On Fri, 23 May 2003 16:15:56 -0400, Andrew Cagney said: > > >> -Wwrite-strings >> It's just hard and really messy. People occasionally chip away at the >> edges. Last time I tried, I came across what appeared to be an >> effective xfree("string"), outch! Just to clarify something. The code I came across appeared to be xfreeing a string that had never been allocated - that's seriously broken! > The xfree issue is an interesting one, and I agree that it's another > root problem. My attitude is actually that xfree should take a const > void * instead of just a void *. Basically, it seems to me that being > writeable and beeing freeable are orthogonal; examples are: Many fixes are possible without fixing decode_line_1. The trick is knowing when a change is turning into a rat hole. Andrew