comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: Requesting help with GNAT 3.09 constraint error, PowerPC
Date: 1997/11/12
Date: 1997-11-12T00:00:00+00:00	[thread overview]
Message-ID: <dewar.879346877@merv> (raw)
In-Reply-To: 3468914F.46B4@scarecrow.gcs.redstone.army.mil


<<I've run into a problem with GNAT 3.09 generating code for the PowerPC.
To make a long debugging session short, I've isolated the problem to
an attempt to typecast a negative floating point number to an unsigned
16.

The following code runs fine on my linux machine when compiled native.
But it gives me a constraint error when I execute it in my PowerPC
environment.  Has anyone encountered this?  Any suggestions?

Oh yeah, I almost forgot.  This only happens with negative numbers.>>

As well it might, unsigned types are somewhat lacking in negative numbers
when you look at the possible values they accomodate!

Your use of the word typecast suggests a C style of thinking, where the
cast is unchecked, most likely what you mean by a typecast in Ada is
a type conversion, and the value must be in range, or you will get a CE.
What is odd here is not the CE, but the fact that you did not expect one!





       reply	other threads:[~1997-11-12  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3468914F.46B4@scarecrow.gcs.redstone.army.mil>
1997-11-12  0:00 ` Robert Dewar [this message]
1997-11-12  0:00   ` Requesting help with GNAT 3.09 constraint error, PowerPC Dale Pontius
replies disabled

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