Re: Ada boolean type

2011-07-14 Thread Richard Guenther
On Thu, 14 Jul 2011, Eric Botcazou wrote: > > and from looking at SET_TYPE_RM_VALUEs definition it doesn't > > touch TYPE_MAX_VALUE. So TYPE_MAX_VALUE is as set from > > make_unsigned_type (8) which should set it to 255, not 1. > > > > So ... how can it be a no-op? > > Look a few lines below. :-

Re: Ada boolean type

2011-07-14 Thread Eric Botcazou
> and from looking at SET_TYPE_RM_VALUEs definition it doesn't > touch TYPE_MAX_VALUE. So TYPE_MAX_VALUE is as set from > make_unsigned_type (8) which should set it to 255, not 1. > > So ... how can it be a no-op? Look a few lines below. :-) In gigi we manipulate both full-fledged Ada types wit

Re: Ada boolean type

2011-07-14 Thread Richard Guenther
On Thu, 14 Jul 2011, Eric Botcazou wrote: > > I'm wondering why for Ada boolean_true_node has a value that is > > not in the range of the Ada type but is, for the specific case, > > 255 instead of 1. Is there a specific reason for that? > > None, boolean_true_node must be 1, that's why we (re)se

Re: Ada boolean type

2011-07-14 Thread Eric Botcazou
> I'm wondering why for Ada boolean_true_node has a value that is > not in the range of the Ada type but is, for the specific case, > 255 instead of 1. Is there a specific reason for that? None, boolean_true_node must be 1, that's why we (re)set it in gnat_init. > Does the following patch make s

Ada boolean type

2011-07-14 Thread Richard Guenther
Hi, I'm wondering why for Ada boolean_true_node has a value that is not in the range of the Ada type but is, for the specific case, 255 instead of 1. Is there a specific reason for that? Does the following patch make sense (untested)? Btw, I wonder if Ada cannot simply use its own boolean_type