This is the mail archive of the
mailing list for the GCC project.
Re: Ada boolean type
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 14 Jul 2011 15:03:02 +0200
- Subject: Re: Ada boolean type
- References: <alpine.LNX.email@example.com>
> 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 sense (untested)?
It's a no-op. TYPE_MAX_VALUE == TYPE_RM_MAX_VALUE if the latter exists.
> Btw, I wonder if Ada cannot simply use its own boolean_type_node
> global tree and leave the middle-ends boolean_type_node alone,
> which is supposed to match the C ABI of the target.
Only after Fortran does the same. :-)