comp.lang.ada
 help / color / mirror / Atom feed
From: "Marc A. Criley" <mcquad2@earthlink.net>
Subject: Re: Function returning "Boolean" in a binding
Date: Sun, 24 Dec 2000 13:14:49 GMT
Date: 2000-12-24T13:14:49+00:00	[thread overview]
Message-ID: <3A45E877.D82BDED7@earthlink.net> (raw)
In-Reply-To: 977592638.247411@cachalote.ip.pt

Yes, "Internal bug" would not be a sanctioned GNAT error message for
this situation.  You ought to send a bug report to report@gnat.com
describing exactly what you saw, and if possible providing a standalone
program that demonstrates the problem.

When you got the "Internal bug" message you were informed of this via a
GNAT "bug box", yes?  Just follow the directions it displays.

Marc A. Criley
Senior Staff Engineer
Quadrus Corporation
www.quadruscorp.com

Antonio Vargas wrote:
> 
> 
>    I thought that conversion from Boolean to C.int was conventioned (I read
> that somewhere ).
> 
>    But anyway since it is something dubious,  the compiler should complain
> about undefined conversion Instead of  the message "Internal bug".
> 
>   And then I'm surprised that they used such a thing in the binding in
> question.
> 
> Antonio Vargas
> 
> Ted Dennison wrote:
> 
> > In article <977543301.615948@cachalote.ip.pt>,
> >   antonio.vargas@clix.pt wrote:
> >
> >    type Xt_Work_Proc is access function (Client_Data : in Xt_Pointer)
> >>       return Boolean;
> >>    pragma Convention (C, Xt_Work_Proc);
> >>
> >> But if I change  the return type form  "Boolean" to "Interfaces.C.Int"
> >> it compiles.  Shouldn't the compiler  make an automatic conversion
> >> from Boolean(Ada side) to C.int  (C side) ?.
> >
> > Why? How does the compiler know that's what you want Boolean to map to?
> > You could want to use it for a C "char" for all it knows.
> >
> >
> > --
> > T.E.D.
> >
> > http://www.telepath.com/~dennison/Ted/TED.html
> >
> >
> > Sent via Deja.com
> > http://www.deja.com/
> >



      reply	other threads:[~2000-12-24 13:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-23  2:47 Function returning "Boolean" in a binding Antonio Vargas
2000-12-23 15:36 ` Ted Dennison
2000-12-23 16:29   ` Antonio Vargas
2000-12-24 13:14     ` Marc A. Criley [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox