Hi,

On Wed, 9 Dec 2009, H.J. Lu wrote:

> > ... because this part can only be guaranteed by the ABI.  Without the
> > above language a compiler would be free to implement any non-zero byte as
> > true for parameter passing without violating the ABI.
> >
> 
> Aren't bits in the _Bool byte of"bar" specified by the psABI

Right now they are specified in the psABI, you suggested to remove that 
specification.

> or the C language standard already?

Nope.  If you don't look at the specific value of a _Bool (by e.g. storing 
it in some global variable) the C standard doesn't say anything about what 
this value must be, except that the true/false behaviour has to be 
preserved.  As-if rules and so on.  The psABI needs to be more specific.

> ---
> extern unsigned int bartmp;
> extern _Bool bar;
> 
> void foo()
> {
>  bartmp = bar;
> }
> ---
> 
> Why should the _Bool byte in "void foo(_Bool bar)"  be any different?

Because it can be different when the psABI doesn't say otherwise.


Ciao,
Michael.

Reply via email to