comp.lang.ada
 help / color / mirror / Atom feed
From: Martin Kristensson <d95krima@dtek.chalmers.se>
Subject: Intermediate expressions and modular types
Date: 1997/10/18
Date: 1997-10-18T00:00:00+00:00	[thread overview]
Message-ID: <344898BA.7361@dtek.chalmers.se> (raw)


-- Ada95
type Modular is mod 2**32;
procedure Test(ModA, ModB : in Modular) is
   X : Integer;
begin
   X := Integer(ModA - ModB);
end Test;

The intermediate expression (ModA - ModB) is calculated modulo 2**32 by
compiler A, but not by compiler B.
Which is right?

Surely the correct behavior must be stated in the RM, but where?

Thanks for your help,
/Martin.




             reply	other threads:[~1997-10-18  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-18  0:00 Martin Kristensson [this message]
1997-10-18  0:00 ` Intermediate expressions and modular types Robert A Duff
replies disabled

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