From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31623 invoked by alias); 25 Nov 2013 05:53:14 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 31614 invoked by uid 89); 25 Nov 2013 05:53:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RDNS_NONE,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-bk0-f44.google.com Received: from Unknown (HELO mail-bk0-f44.google.com) (209.85.214.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Mon, 25 Nov 2013 05:53:12 +0000 Received: by mail-bk0-f44.google.com with SMTP id d7so1706904bkh.3 for ; Sun, 24 Nov 2013 21:53:03 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.205.106.6 with SMTP id ds6mr22494591bkc.23.1385358783359; Sun, 24 Nov 2013 21:53:03 -0800 (PST) Received: by 10.205.68.134 with HTTP; Sun, 24 Nov 2013 21:53:03 -0800 (PST) In-Reply-To: <52924326.3010702@gmail.com> References: <52924326.3010702@gmail.com> Date: Mon, 25 Nov 2013 17:50:00 -0000 Message-ID: Subject: Re: Unable to use bool type in i386.h From: Terry Guo To: =?ISO-8859-1?Q?=C1ngel_Gonz=E1lez?= Cc: Jonathan Wakely , =?ISO-8859-2?Q?J=EAdrzej_Dudkiewicz?= , gcc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00198.txt.bz2 On Mon, Nov 25, 2013 at 2:19 AM, =C1ngel Gonz=E1lez wro= te: > On 22/11/13 15:36, Terry Guo wrote: >> >> On Fri, Nov 22, 2013 at 10:34 PM, Jonathan Wakely >> wrote: >>> >>> On 22 November 2013 14:09, Terry Guo wrote: >>>> >>>> But if you search i386.c, you will find many bool type variables. Why >>>> it works for i386.c but not for i386.h? >>> >>> i386.h is a header, it's not only used in one place. >>> >>> I assume your error is because i386.c is compiled as a C++ file, but >>> i386.h is included in a file that is compiled as a C file, e.g. >>> libgcc.c >> >> Yes. I have same understanding. Is it possible to compile libgcc.c as >> a C++ file? >> >> BR, >> Terry > > IMHO the best solution would be to #include in i386.h > Thank you all. I did learned something behind the question. All of your solutions can work. I will pick up the one that is fit for my requirement. BR, Terry