This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Unable to use bool type in i386.h


On Mon, Nov 25, 2013 at 2:19 AM, Ángel González <keisial@gmail.com> wrote:
> On 22/11/13 15:36, Terry Guo 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?
>>
>> BR,
>> Terry
>
> IMHO the best solution would be to  #include <stdbool.h> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]