From patchwork Wed Aug 7 20:35:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 265608 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]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 2F6CA2C0090 for ; Thu, 8 Aug 2013 06:35:48 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version; q=dns; s=default; b=IvGDj2qK/h66wYw3 jvTNfNAGMBubsayJfQXTaxUBeqcd0t0b0w5e1AjSnHoLMDppTJs/tM6zmD83weu9 AiCWwABceujfx19l6DTyytf/URehEQsvr7sr/lEqoqa9Q1Y452Nc0BRZXY6X2upf LoBAFT9kqOCkcBlsZGPcs6AH7OQ= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version; s=default; bh=ggBhGKmVk5hYP0qn1dde3N 4conc=; b=hoQEuqblIy0M3Vy0hjnvqLG3xBws96HUho5cXi+0gy/i8dsMzjPv0l eaDXulC6CX9L4Aw8m+q+Jf8azYpE690mrzAburysKAseDG0rgsQDrtEsDzbxMVaY /jV3xFUD6u0JOTV9SI5COCCsxUyolTPjsIsKQ9pG+AiFYgIDjMCSg= Received: (qmail 19467 invoked by alias); 7 Aug 2013 20:35:41 -0000 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 Received: (qmail 19452 invoked by uid 89); 7 Aug 2013 20:35:40 -0000 X-Spam-SWARE-Status: No, score=-5.3 required=5.0 tests=AWL, BAYES_00, KHOP_THREADED, RCVD_IN_HOSTKARMA_W, RCVD_IN_HOSTKARMA_WL, RDNS_NONE, SPF_HELO_PASS, SPF_PASS autolearn=no version=3.3.1 Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 07 Aug 2013 20:35:37 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r77KZU6G006000 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 7 Aug 2013 16:35:30 -0400 Received: from [10.18.25.132] ([10.18.25.132]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r77KZSo1003251; Wed, 7 Aug 2013 16:35:29 -0400 Message-ID: <1375907726.3666.32.camel@surprise> Subject: Re: [buildbot] r201508: Build failures after pass C++ conversion From: David Malcolm To: Andreas Schwab Cc: Richard Henderson , Jan-Benedict Glaw , gcc-patches@gcc.gnu.org Date: Wed, 07 Aug 2013 16:35:26 -0400 In-Reply-To: References: <20130805201605.1748.qmail@sourceware.org> <20130806111256.GA16320@lug-owl.de> <1375805184.1954.15.camel@surprise> <52015DEB.4090805@redhat.com> <1375824206.5818.24.camel@surprise> Mime-Version: 1.0 X-Virus-Found: No On Wed, 2013-08-07 at 09:01 +0200, Andreas Schwab wrote: > David Malcolm writes: > > > diff --git a/gcc/coretypes.h b/gcc/coretypes.h > > index edb9c8c..54bfe7f 100644 > > --- a/gcc/coretypes.h > > +++ b/gcc/coretypes.h > > @@ -169,6 +169,12 @@ typedef const struct basic_block_def *const_basic_block; > > in target.h. */ > > typedef int reg_class_t; > > > > +class rtl_opt_pass; > > + > > +namespace gcc { > > + class context; > > +} > > + > > This break Ada. > > ../../xgcc -B../../ -c -DIN_GCC -DUSE_LIBUNWIND_EXCEPTIONS -O2 -g -W -Wall \ > -iquote /usr/local/gcc/gcc-20130807/gcc \ > -iquote . -iquote .. -iquote ../.. -iquote /usr/local/gcc/gcc-20130807/gcc/ada -iquote /usr/local/gcc/gcc-20130807/gcc -I/usr/local/gcc/gcc-20130807/gcc/../include -I/usr/local/gcc/gcc-20130807/Build/./gmp -I/usr/local/gcc/gcc-20130807/gmp -I/usr/local/gcc/gcc-20130807/Build/./mpfr -I/usr/local/gcc/gcc-20130807/mpfr -I/usr/local/gcc/gcc-20130807/mpc/src \ > ../rts/targext.c -o targext.o > In file included from ../rts/targext.c:45:0: > /usr/local/gcc/gcc-20130807/gcc/coretypes.h:172:1: error: unknown type name 'class' > class rtl_opt_pass; > ^ > /usr/local/gcc/gcc-20130807/gcc/coretypes.h:174:1: error: unknown type name 'namespace' > namespace gcc { > ^ > /usr/local/gcc/gcc-20130807/gcc/coretypes.h:174:15: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token > namespace gcc { > ^ > make[3]: *** [targext.o] Error 1 Sorry. How does the attached look? (am bootstrapping now) commit 7af885276832d17e56cbb8e09787b2d4d95dc5ea Author: David Malcolm Date: Wed Aug 7 15:54:26 2013 -0400 Fix C++ usage in coretypes.h gcc/ * coretypes.h: Wrap decls using C++ syntax in a #ifdef __cplusplus for the sake of source files still built as pure C. diff --git a/gcc/coretypes.h b/gcc/coretypes.h index 54bfe7f..b28040a 100644 --- a/gcc/coretypes.h +++ b/gcc/coretypes.h @@ -169,11 +169,13 @@ typedef const struct basic_block_def *const_basic_block; in target.h. */ typedef int reg_class_t; +#ifdef __cplusplus class rtl_opt_pass; namespace gcc { class context; } +#endif /* __cplusplus */ #else