From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6297 invoked by alias); 5 Mar 2011 19:16:39 -0000 Received: (qmail 6283 invoked by uid 22791); 5 Mar 2011 19:16:39 -0000 X-SWARE-Spam-Status: No, hits=-0.4 required=5.0 tests=AWL,BAYES_50,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 05 Mar 2011 19:16:35 +0000 Received: (qmail 305 invoked from network); 5 Mar 2011 19:16:33 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 5 Mar 2011 19:16:33 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1Pvwxr-0001jm-KL; Sat, 05 Mar 2011 19:16:31 +0000 Date: Sat, 05 Mar 2011 19:16:00 -0000 From: "Joseph S. Myers" To: Jim Meyering cc: gcc-patches@gcc.gnu.org, java-patches@gcc.gnu.org Subject: Re: avoid useless if-before-free tests In-Reply-To: <87zkp9zmq0.fsf@rho.meyering.net> Message-ID: References: <87zkp9zmq0.fsf@rho.meyering.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-03/txt/msg00259.txt.bz2 On Sat, 5 Mar 2011, Jim Meyering wrote: > diff --git a/gcc/config/i386/gmm_malloc.h b/gcc/config/i386/gmm_malloc.h > index 7a7e840..8993fc7 100644 > --- a/gcc/config/i386/gmm_malloc.h > +++ b/gcc/config/i386/gmm_malloc.h > @@ -67,8 +67,7 @@ _mm_malloc (size_t size, size_t align) > static __inline__ void > _mm_free (void * aligned_ptr) > { > - if (aligned_ptr) > - free (((void **) aligned_ptr) [-1]); > + free (((void **) aligned_ptr) [-1]); > } This one looks suspicious; it's not if (p) free (p); but if (p) free (something-derived-from-p);. > diff --git a/libjava/classpath/native/fdlibm/dtoa.c b/libjava/classpath/native/fdlibm/dtoa.c > index 458e629..92aa793 100644 http://gcc.gnu.org/codingconventions.html says Classpath changes should go via Classpath upstream, not directly into GCC. I don't know if that's still accurate. > diff --git a/zlib/contrib/minizip/unzip.c b/zlib/contrib/minizip/unzip.c > index 9ad4766..644ef1b 100644 We definitely don't want to make local changes to zlib for this sort of issue, though importing a new upstream version of zlib (making sure the local configure code still works) should be fine for 4.7. -- Joseph S. Myers joseph@codesourcery.com