Re: Unable to use bool type in i386.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux