public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Terry Guo <flameroc@gmail.com>
To: Rob <robpilling@gmail.com>
Cc: gcc <gcc-help@gcc.gnu.org>
Subject: Re: Unable to use bool type in i386.h
Date: Fri, 22 Nov 2013 14:09:00 -0000	[thread overview]
Message-ID: <CAGbRaL4h-WY3HytuZWxWdANXzkDqJS8XiWn53GsA2aO=Of0-tQ@mail.gmail.com> (raw)
In-Reply-To: <CAPQ98VUtsfFupqML864+5d_90ZvOEacB5fiuA2pRgjX_5AffSw@mail.gmail.com>

On Fri, Nov 22, 2013 at 8:53 PM, Rob <robpilling@gmail.com> wrote:
> It seems that C files include this, so you'll want _Bool, or just use an int.
>
> BR,
> Rob
>

Thanks for your reply. I know I can use the int. But the bool type is
more precise. And now GCC is in C++, the bool type should be
supported. I am curious whether this is a missing part of GCC. Can
someone please help to confirm?

BR,
Terry

> On 22 November 2013 11:51, Terry Guo <flameroc@gmail.com> wrote:
>> Hi there,
>>
>> I am using latest trunk code and declared a bool type variable in
>> i386.h as below:
>>
>> extern bool mybool;
>>
>> And then configure gcc as:
>>
>> ../gcc/configure --enable-languages=c,c++ --disable-bootstrap
>>
>> During the stage of libgcc build, I then ran into following errors:
>>
>> make[3]: Leaving directory
>> `/myssd/terguo01/toolchain-build/flash-prefetch/src/gcc-build/i686-pc-linux-gnu/libgcc'
>> /myssd/terguo01/toolchain-build/flash-prefetch/src/gcc-build/./gcc/xgcc
>> -B/myssd/terguo01/toolchain-build/flash-prefetch/src/gcc-build/./gcc/
>> -B/usr/local/i686-pc-linux-gnu/bin/
>> -B/usr/local/i686-pc-linux-gnu/lib/ -isystem
>> /usr/local/i686-pc-linux-gnu/include -isystem
>> /usr/local/i686-pc-linux-gnu/sys-include    -g -O2 -O2  -g -O2
>> -DIN_GCC    -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes
>> -Wmissing-prototypes -Wold-style-definition  -isystem ./include
>> -fpic -mlong-double-80 -g -DIN_LIBGCC2 -fbuilding-libgcc
>> -fno-stack-protector   -fpic -mlong-double-80 -I. -I. -I../.././gcc
>> -I../../../gcc/libgcc -I../../../gcc/libgcc/.
>> -I../../../gcc/libgcc/../gcc -I../../../gcc/libgcc/../include
>> -I../../../gcc/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT
>> -DHAVE_CC_TLS  -DUSE_TLS -o _clear_cache.o -MT _clear_cache.o -MD -MP
>> -MF _clear_cache.dep -DL_clear_cache -c ../../../gcc/libgcc/libgcc2.c
>> -fvisibility=hidden -DHIDE_EXPORTS
>> In file included from ../.././gcc/tm.h:22:0,
>>                  from ../../../gcc/libgcc/libgcc2.c:29:
>> ../../../gcc/libgcc/../gcc/config/i386/i386.h:2099:1: error: unknown
>> type name ‘bool’
>>  extern bool mybool;
>>  ^
>> In file included from ../.././gcc/tm.h:22:0,
>>                  from ../../../gcc/libgcc/libgcc2.c:29:
>> ../../../gcc/libgcc/../gcc/config/i386/i386.h:2099:1: error: unknown
>> type name ‘bool’
>>  extern bool mybool;
>>  ^
>> In file included from ../.././gcc/tm.h:22:0,
>>                  from ../../../gcc/libgcc/libgcc2.c:29:
>> ../../../gcc/libgcc/../gcc/config/i386/i386.h:2099:1: error: unknown
>> type name ‘bool’
>>  extern bool mybool;
>>  ^
>> In file included from ../.././gcc/tm.h:22:0,
>>                  from ../../../gcc/libgcc/libgcc2.c:29:
>> ../../../gcc/libgcc/../gcc/config/i386/i386.h:2099:1: error: unknown
>> type name ‘bool’
>>  extern bool mybool;
>>  ^
>> In file included from ../.././gcc/tm.h:22:0,
>>                  from ../../../gcc/libgcc/libgcc2.c:29:
>> ../../../gcc/libgcc/../gcc/config/i386/i386.h:2099:1: error: unknown
>> type name ‘bool’
>>  extern bool mybool;
>>  ^
>> In file included from ../.././gcc/tm.h:22:0,
>>                  from ../../../gcc/libgcc/libgcc2.c:29:
>> ../../../gcc/libgcc/../gcc/config/i386/i386.h:2099:1: error: unknown
>> type name ‘bool’
>>  extern bool mybool;
>>  ^
>> make[2]: *** [_muldi3.o] Error 1
>> make[2]: *** Waiting for unfinished jobs....
>> make[2]: *** [_negdi2.o] Error 1
>> make[2]: *** [_ashldi3.o] Error 1
>> make[2]: *** [_cmpdi2.o] Error 1
>> make[2]: *** [_lshrdi3.o] Error 1
>> make[2]: *** [_ashrdi3.o] Error 1
>> In file included from ../.././gcc/tm.h:22:0,
>>                  from ../../../gcc/libgcc/libgcc2.c:29:
>> ../../../gcc/libgcc/../gcc/config/i386/i386.h:2099:1: error: unknown
>> type name ‘bool’
>>  extern bool mybool;
>>  ^
>> In file included from ../.././gcc/tm.h:22:0,
>>                  from ../../../gcc/libgcc/libgcc2.c:29:
>> ../../../gcc/libgcc/../gcc/config/i386/i386.h:2099:1: error: unknown
>> type name ‘bool’
>>  extern bool mybool;
>>  ^
>> make[2]: *** [_clear_cache.o] Error 1
>> make[2]: *** [_ucmpdi2.o] Error 1
>> make[2]: Leaving directory
>> `/myssd/terguo01/toolchain-build/flash-prefetch/src/gcc-build/i686-pc-linux-gnu/libgcc'
>> make[1]: *** [all-target-libgcc] Error 2
>> make[1]: Leaving directory
>> `/myssd/terguo01/toolchain-build/flash-prefetch/src/gcc-build'
>> make: *** [all] Error 2
>>
>> What should I do to use bool type in i386.h? Please help. Thanks in advance.
>>
>> BR,
>> Terry

  reply	other threads:[~2013-11-22 13:59 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 [this message]
     [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
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='CAGbRaL4h-WY3HytuZWxWdANXzkDqJS8XiWn53GsA2aO=Of0-tQ@mail.gmail.com' \
    --to=flameroc@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=robpilling@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).