From patchwork Sat Sep 24 19:58:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marc Glisse X-Patchwork-Id: 116259 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 F27EFB6F77 for ; Sun, 25 Sep 2011 05:58:57 +1000 (EST) Received: (qmail 27408 invoked by alias); 24 Sep 2011 19:58:55 -0000 Received: (qmail 27399 invoked by uid 22791); 24 Sep 2011 19:58:54 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL, 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, 24 Sep 2011 19:58:35 +0000 Received: from afontenayssb-151-1-47-50.w82-121.abo.wanadoo.fr (HELO laptop-mg.local) ([82.121.94.50]) by mail1-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 24 Sep 2011 21:58:33 +0200 Date: Sat, 24 Sep 2011 21:58:14 +0200 (CEST) From: Marc Glisse 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 On Sat, 17 Sep 2011, Joseph S. Myers wrote: > These are OK (with ChangeLog entries properly omitting the "include/", > since they go in include/ChangeLog) in the absence of libiberty maintainer > objections within 72 hours. Thanks. Is someone willing to commit them now they have been accepted? I am attaching them as a single patch and copying the changelog entries here for convenience (I wrote the date of Monday because it looks like a day where someone might have time to commit...). include/ChangeLog: 2011-09-26 Ulrich Drepper * obstack.h [!GNUC] (obstack_free): Avoid cast to int. 2011-09-26 Marc Glisse * ansidecl.h (ENUM_BITFIELD): Always use enum in C++ Index: include/ansidecl.h =================================================================== --- include/ansidecl.h (revision 179146) +++ include/ansidecl.h (working copy) @@ -416,10 +416,12 @@ #define EXPORTED_CONST const #endif -/* Be conservative and only use enum bitfields with GCC. +/* Be conservative and only use enum bitfields with C++ or GCC. FIXME: provide a complete autoconf test for buggy enum bitfields. */ -#if (GCC_VERSION > 2000) +#ifdef __cplusplus +#define ENUM_BITFIELD(TYPE) enum TYPE +#elif (GCC_VERSION > 2000) #define ENUM_BITFIELD(TYPE) __extension__ enum TYPE #else #define ENUM_BITFIELD(TYPE) unsigned int Index: include/obstack.h =================================================================== --- include/obstack.h (revision 179146) +++ include/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__ */