From patchwork Sat Sep 17 07:58:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Glisse X-Patchwork-Id: 115099 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 757A0B70BF for ; Sat, 17 Sep 2011 17:59:06 +1000 (EST) Received: (qmail 9099 invoked by alias); 17 Sep 2011 07:59:04 -0000 Received: (qmail 9091 invoked by uid 22791); 17 Sep 2011 07:59:03 -0000 X-SWARE-Spam-Status: No, hits=-7.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail1-relais-roc.national.inria.fr (HELO mail1-relais-roc.national.inria.fr) (192.134.164.82) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 17 Sep 2011 07:58:42 +0000 Received: from ip-133.net-81-220-116.brest.rev.numericable.fr (HELO laptop-mg.local) ([81.220.116.133]) by mail1-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 17 Sep 2011 09:58:40 +0200 Date: Sat, 17 Sep 2011 09:58:40 +0200 (CEST) From: Marc Glisse Reply-To: gcc-patches@gcc.gnu.org To: "Joseph S. Myers" cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] non-GNU C++ compilers In-Reply-To: Message-ID: References: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org (the original discussion started here: http://gcc.gnu.org/ml/gcc-patches/2011-08/msg00758.html ) On Mon, 8 Aug 2011, Joseph S. Myers wrote: > On Mon, 8 Aug 2011, Marc Glisse wrote: > >> * include/obstack.h (obstack_free): Cast to char* instead of int > > This header comes from glibc/gnulib. Although some local changes have > been made to it in the past, sending any fixes to upstream glibc is still > a good idea. It was fixed in glibc. The equivalent patch (not identical because the files are already different) for gcc would be the one attached. > (ansidecl.h *claims* to come from glibc but the glibc copy was removed in > 1997. obstack.h really does still come from glibc.) Is someone willing to review (and possibly commit) these 2 patches? Changelog for include/obstack.h in glibc (guess it should be copied almost as is?): 2011-09-11 Ulrich Drepper * obstack.h [!GNUC] (obstack_free): Avoid cast to int. Changelog for the ansidecl.h part: 2011-08-08 Marc Glisse * include/ansidecl.h (ENUM_BITFIELD): Always use enum in C++ Index: obstack.h =================================================================== --- obstack.h (revision 178906) +++ obstack.h (working copy) @@ -532,9 +532,9 @@ # define obstack_free(h,obj) \ ( (h)->temp = (char *) (obj) - (char *) (h)->chunk, \ (((h)->temp > 0 && (h)->temp < (h)->chunk_limit - (char *) (h)->chunk)\ - ? (int) ((h)->next_free = (h)->object_base \ - = (h)->temp + (char *) (h)->chunk) \ - : (((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0), 0))) + ? (((h)->next_free = (h)->object_base \ + = (h)->temp + (char *) (h)->chunk), 0) \ + : ((obstack_free) ((h), (h)->temp + (char *) (h)->chunk), 0))) #endif /* not __GNUC__ or not __STDC__ */