This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [Ada] Standard.Interger'Size = 32?
- From: Laurent GUERBY <laurent at guerby dot net>
- To: Bernd Trog <berndtrog at yahoo dot com>
- Cc: Robert Dewar <dewar at adacore dot com>, gcc at gcc dot gnu dot org
- Date: Sun, 06 Mar 2005 14:29:41 +0100
- Subject: Re: [Ada] Standard.Interger'Size = 32?
- References: <20050306121259.30791.qmail@web51805.mail.yahoo.com>
On Sun, 2005-03-06 at 04:12 -0800, Bernd Trog wrote:
> On Thu, 3 Mar 2005, Robert Dewar wrote:
>
> > Bernd Trog wrote:
> > > according to the gnat ref. manual
> > >
> http://gcc.gnu.org/onlinedocs/gnat_rm/Implementation-Defined-Characteristics.html
> > >
> > > Standard.Interger'Size is 32 bit for the compilation target.
> > >
> > > I'd like to know if the Ada frontend (not the runtime
> > > system) depends on this (target) setting in any way?
> >
> > Yes, the front end uses Ada strings which are indexed by Integer.
> > Integer cannot be 16 bits. The Ada RM does allow this, but I am
> > pretty sure GNAT counts on integer being 32 bits.
>
> OK. So the user should be warned (by documentation and the compiler)
> when he tries to use the Ada frontent with backend that can set
> INT_TYPE_SIZE to 16, right?
Getting GNAT to be hosted on a 16 bit machine is probably not
workable. On the other side, targetting a 16 bit machine from a >= 32
bit host should be doable for Ada.
> A 'grep INT_TYPE_SIZE' lists avr, h8300, ip2k, m68hc11, m68k,
> pdp11 and stormy16 as possible candidates for such a warning.
I believe Stéphane Carrez was able to run some Ada on a m68hc11,
see http://gel.sourceforge.net/ada_example.php
Laurent