comp.lang.ada
 help / color / mirror / Atom feed
* Re: Requesting help with GNAT 3.09 constraint error, PowerPC
       [not found] <3468914F.46B4@scarecrow.gcs.redstone.army.mil>
@ 1997-11-12  0:00 ` Robert Dewar
  1997-11-12  0:00   ` Dale Pontius
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Dewar @ 1997-11-12  0:00 UTC (permalink / raw)



<<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!





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Requesting help with GNAT 3.09 constraint error, PowerPC
  1997-11-12  0:00 ` Requesting help with GNAT 3.09 constraint error, PowerPC Robert Dewar
@ 1997-11-12  0:00   ` Dale Pontius
  0 siblings, 0 replies; 2+ messages in thread
From: Dale Pontius @ 1997-11-12  0:00 UTC (permalink / raw)



In article <dewar.879346877@merv>,
        dewar@merv.cs.nyu.edu (Robert Dewar) writes:
>
> What is odd here is not the CE, but the fact that you did not expect one!
>
No, what is odd is that apparently this worked on his Linux machine.
He should have expected the CE, but it's probably sadly too common
that he didn't.

Dale Pontius
(NOT speaking for IBM)




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1997-11-12  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <3468914F.46B4@scarecrow.gcs.redstone.army.mil>
1997-11-12  0:00 ` Requesting help with GNAT 3.09 constraint error, PowerPC Robert Dewar
1997-11-12  0:00   ` Dale Pontius

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