public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joel Sherrill <joel.sherrill@oarcorp.com>
To: Florian Weimer <fw@deneb.enyo.de>
Cc: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: Ada type in binding for C99 bool
Date: Tue, 22 Sep 2009 17:54:00 -0000	[thread overview]
Message-ID: <4AB90F59.6040700@oarcorp.com> (raw)
In-Reply-To: <871vlydi67.fsf@mid.deneb.enyo.de>

Florian Weimer wrote:
> * Joel Sherrill:
>
>   
>> What is the proper type to use in an Ada binding
>> for a C method that returns a C99 bool?
>>     
>
> Whatever the answer is, it should be used to define Interfaces.C.Bool.
> (I don't know what GCC's options for representing _Bool are, sorry.)
>
>   
It appears to be unsigned char or at least sizeof(bool)=1
on the architectures I tried this test program on.

#include <stdbool.h>

bool x;
int s = sizeof(bool);

Unfortunately bool is defined to _Bool and that must be
something gcc recognizes.  I don't see it in .h files.

So I am only slightly more sure of it than you are. :)

--joel

  reply	other threads:[~2009-09-22 17:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-21 20:04 Joel Sherrill
2009-09-22 17:05 ` Florian Weimer
2009-09-22 17:54   ` Joel Sherrill [this message]
2009-09-22 18:00     ` Gabriel Dos Reis
2009-09-22 18:21     ` Florian Weimer
2009-09-22 19:03     ` Joseph S. Myers

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=4AB90F59.6040700@oarcorp.com \
    --to=joel.sherrill@oarcorp.com \
    --cc=fw@deneb.enyo.de \
    --cc=gcc@gcc.gnu.org \
    /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).