comp.lang.ada
 help / color / mirror / Atom feed
From: austin.obyrne769@btinternet.com
Subject: Integer Overflow Question.
Date: Mon, 25 Aug 2014 04:21:33 -0700 (PDT)
Date: 2014-08-25T04:21:33-07:00	[thread overview]
Message-ID: <9c5de333-276c-4e3a-be5a-4e5a98cdaa1d@googlegroups.com> (raw)

I have written two Ada driven ciphers that are complete and have been tweaked for the last time.

I have used an early Ada compiler - a Gnat311.p - of about 1995 vintage  <= Ada-95.

In order that the ciphers can run in 32-bit computers which are still going to be around for some time despite the availability of the 64-bit operating system in Windows 8.1 which I also use, I have had to put a bound on the maximum integer size output of computations at 2^31 which of course is the maximum positive integer that 32-bit computers can handle.

Running the same software that was written for 32-bit computers in the  64-bit environment of 8.1 and raising the bar on integer size I thought I should be able to do this ok but no - the cipher will still crash if the integer size is greater than 2^31 when I thought I could go up to 2^63.

As it happens this is not a problem crypto wise because the cipher is independent of the integer size but I am intrigued that this overflow should still happen.

I am coming to the conclusion that the max integer size than can be used without integer overflow occurring in any computer is a function of the Ada compiler being used and not the computer operating system???

Could anybody throw some light on this conjecture?

Thanking you in anticipation of your usual help,

adacrypt

             reply	other threads:[~2014-08-25 11:21 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-25 11:21 austin.obyrne769 [this message]
2014-08-25 11:46 ` Integer Overflow Question G.B.
2014-08-25 12:58   ` austin.obyrne769
2014-08-25 13:09     ` Simon Clubley
2014-08-25 13:29       ` austin.obyrne769
2014-08-25 13:44         ` Simon Clubley
2014-08-25 13:34     ` Aay Jay Chan
2014-08-25 15:09       ` austin.obyrne769
2014-08-25 17:02       ` austin.obyrne769
2014-08-25 17:21         ` Simon Wright
2014-08-25 17:56           ` austin.obyrne769
2014-08-25 19:38           ` austin.obyrne769
2014-08-25 17:40         ` Simon Clubley
2014-08-25 18:09           ` austin.obyrne769
2014-08-25 12:20 ` gautier_niouzes
2014-08-25 12:54   ` austin.obyrne769
replies disabled

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