From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11633 invoked by alias); 22 Sep 2009 18:00:35 -0000 Received: (qmail 11604 invoked by uid 22791); 22 Sep 2009 18:00:32 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-vw0-f178.google.com (HELO mail-vw0-f178.google.com) (209.85.212.178) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 22 Sep 2009 18:00:26 +0000 Received: by vws8 with SMTP id 8so55591vws.14 for ; Tue, 22 Sep 2009 11:00:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.114.142 with SMTP id e14mr1942312vcq.83.1253642424889; Tue, 22 Sep 2009 11:00:24 -0700 (PDT) Reply-To: gdr@integrable-solutions.net In-Reply-To: <4AB90F59.6040700@oarcorp.com> References: <4AB7DC52.2010305@oarcorp.com> <871vlydi67.fsf@mid.deneb.enyo.de> <4AB90F59.6040700@oarcorp.com> Date: Tue, 22 Sep 2009 18:00:00 -0000 Message-ID: <206fcf960909221100p3ee28d55jfcf1c584c2d124dd@mail.gmail.com> Subject: Re: Ada type in binding for C99 bool From: Gabriel Dos Reis To: Joel Sherrill Cc: Florian Weimer , "gcc@gcc.gnu.org" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-09/txt/msg00443.txt.bz2 On Tue, Sep 22, 2009 at 12:54 PM, Joel Sherrill wrote: > 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)=3D1 > on the architectures I tried this test program on. > > #include > > bool x; > int s =3D sizeof(bool); > > Unfortunately bool is defined to _Bool and that must be > something gcc recognizes. =A0I don't see it in .h files. C99 Boolean type is _Bool. C99 requires people to include if they want to write bool instead of _Bool. > > --joel >