From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3319 invoked by alias); 22 Nov 2013 14:50:49 -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 3308 invoked by uid 89); 22 Nov 2013 14:50:49 -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-f54.google.com Received: from Unknown (HELO mail-bk0-f54.google.com) (209.85.214.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 22 Nov 2013 14:50:47 +0000 Received: by mail-bk0-f54.google.com with SMTP id v16so827600bkz.41 for ; Fri, 22 Nov 2013 06:50:38 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.204.166.72 with SMTP id l8mr140549bky.108.1385131838362; Fri, 22 Nov 2013 06:50:38 -0800 (PST) Received: by 10.205.68.134 with HTTP; Fri, 22 Nov 2013 06:50:38 -0800 (PST) In-Reply-To: References: Date: Fri, 22 Nov 2013 14:57:00 -0000 Message-ID: Subject: Re: Unable to use bool type in i386.h From: Terry Guo To: Jonathan Wakely Cc: =?ISO-8859-2?Q?J=EAdrzej_Dudkiewicz?= , gcc Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2013-11/txt/msg00185.txt.bz2 On Fri, Nov 22, 2013 at 10:36 PM, 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? > The i386.c is compiles as g++ -c -g -O2 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -I. -I. -I../../gcc/gcc -I../../gcc/gcc/. -I../../gcc/gcc/../include -I../../gcc/gcc/../libcpp/include -I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc/gcc/../libbacktrace -o i386.o -MT i386.o -MMD -MP -MF ./.deps/i386.TPo ../../gcc/gcc/config/i386/i386.c while the libgcc2.c is compiled as a pure C file. For GCC we have something like GCC in C++, will we have something like LIBGCC in C++? BR, Terry