public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Terry Guo <flameroc@gmail.com>
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: "Jędrzej Dudkiewicz" <jedrzej.dudkiewicz@gmail.com>,
	gcc <gcc-help@gcc.gnu.org>
Subject: Re: Unable to use bool type in i386.h
Date: Fri, 22 Nov 2013 14:57:00 -0000	[thread overview]
Message-ID: <CAGbRaL41O6v7KHXbSY-nd00bEL99odYSnYhkVwyXgthACVZaXA@mail.gmail.com> (raw)
In-Reply-To: <CAGbRaL4b4BOHB0ax7kPjm9SmyWMgUaKq6C3YBs3FY=OZoiJ9rg@mail.gmail.com>

On Fri, Nov 22, 2013 at 10:36 PM, Terry Guo <flameroc@gmail.com> wrote:
> On Fri, Nov 22, 2013 at 10:34 PM, Jonathan Wakely <jwakely.gcc@gmail.com> 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

  reply	other threads:[~2013-11-22 14:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-22 12:54 Terry Guo
2013-11-22 13:59 ` Rob
2013-11-22 14:09   ` Terry Guo
     [not found]     ` <CABJqhQOf-uMVq71_dVQ1pxZyX0Pd9yYW3PdYNHP5vk3hYFJPUw@mail.gmail.com>
2013-11-22 14:34       ` Terry Guo
2013-11-22 14:34         ` Jonathan Wakely
2013-11-22 14:38           ` Terry Guo
2013-11-22 14:57             ` Terry Guo [this message]
2013-11-22 19:40               ` Jonathan Wakely
2013-11-24 20:19             ` Ángel González
2013-11-25 17:50               ` Terry Guo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAGbRaL41O6v7KHXbSY-nd00bEL99odYSnYhkVwyXgthACVZaXA@mail.gmail.com \
    --to=flameroc@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=jedrzej.dudkiewicz@gmail.com \
    --cc=jwakely.gcc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).