<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2003/10/329e43152b4d6e7fe469e8388574a56c"
  from="Alex Baretta &lt;alex@b...&gt;"
  author="Alex Baretta"
  date="2003-10-30T17:37:52"
  subject="Re: [Caml-list] Int overflow in literals"
  prev="2003/10/39398c5887f754e45f919b449d116eb2"
  next="2003/10/02243bece60cca6bd1ce2e86faebb27b"
  prev-in-thread="2003/10/32589dd80abb3734f897d4001f6b0798"
  next-in-thread="2003/10/02243bece60cca6bd1ce2e86faebb27b"
  prev-thread="2003/10/7a1d0d1df3a10032e044f94b7a97dc58"
  next-thread="2003/10/89daa7fd59e499b8d6e24c3bbae1909e"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Int overflow in literals">
<msg 
  url="2003/10/32589dd80abb3734f897d4001f6b0798"
  from="Marcin &apos;Qrczak&apos; Kowalczyk &lt;qrczak@k...&gt;"
  author="Marcin &apos;Qrczak&apos; Kowalczyk"
  date="2003-10-30T13:53:38"
  subject="[Caml-list] Int overflow in literals">
<msg 
  url="2003/10/329e43152b4d6e7fe469e8388574a56c"
  from="Alex Baretta &lt;alex@b...&gt;"
  author="Alex Baretta"
  date="2003-10-30T17:37:52"
  subject="Re: [Caml-list] Int overflow in literals">
<msg 
  url="2003/10/02243bece60cca6bd1ce2e86faebb27b"
  from="Frederic van der Plancke &lt;fvdp@d...&gt;"
  author="Frederic van der Plancke"
  date="2003-10-30T17:59:36"
  subject="Re: [Caml-list] Int overflow in literals">
<msg 
  url="2003/10/16cf1119550bc482f61d8a175850278e"
  from="Oleg Trott &lt;oleg_trott@c...&gt;"
  author="Oleg Trott"
  date="2003-10-30T19:20:41"
  subject="Re: [Caml-list] Int overflow in literals">
<msg 
  url="2003/10/e7fcc98c05c60dd534058a2b5b755835"
  from="Marcin &apos;Qrczak&apos; Kowalczyk &lt;qrczak@k...&gt;"
  author="Marcin &apos;Qrczak&apos; Kowalczyk"
  date="2003-10-30T19:40:19"
  subject="Re: [Caml-list] Int overflow in literals">
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2003/10/d8c3fbc32e86e94e8ade943b11575559"
  from="Issac Trotts &lt;ijtrotts@u...&gt;"
  author="Issac Trotts"
  date="2003-10-30T19:56:17"
  subject="Re: [Caml-list] Int overflow in literals">
<msg 
  url="2003/10/eb7cd1d58675f14a11da772da1f15578"
  from="Oleg Trott &lt;oleg_trott@c...&gt;"
  author="Oleg Trott"
  date="2003-10-30T21:15:25"
  subject="Re: [Caml-list] Int overflow in literals">
<msg 
  url="2003/11/4e5b55dd0ab15dd2c4921eafe1161d84"
  from="skaller &lt;skaller@o...&gt;"
  author="skaller"
  date="2003-11-02T16:08:00"
  subject="Re: [Caml-list] Int overflow in literals">
<msg 
  url="2003/11/04e387ee924398c00a5a96cd87e690df"
  from="Brian Hurt &lt;bhurt@s...&gt;"
  author="Brian Hurt"
  date="2003-11-02T16:22:37"
  subject="Re: [Caml-list] Int overflow in literals">
<msg 
  url="2003/11/b454dcb9c7802c6cc90341d4f6aa93dd"
  from="Marcin &apos;Qrczak&apos; Kowalczyk &lt;qrczak@k...&gt;"
  author="Marcin &apos;Qrczak&apos; Kowalczyk"
  date="2003-11-02T16:39:07"
  subject="Re: [Caml-list] Int overflow in literals">
</msg>
<msg 
  url="2003/11/e3b8f18d6ed983fac7eada29e2dd6c76"
  from="skaller &lt;skaller@o...&gt;"
  author="skaller"
  date="2003-11-07T08:23:37"
  subject="Re: [Caml-list] Int overflow in literals">
</msg>
</msg>
</msg>
<msg 
  url="2003/10/6052deff2fa249f89ca03e7956cad582"
  from="Kenneth Knowles &lt;kknowles@u...&gt;"
  author="Kenneth Knowles"
  date="2003-10-30T21:28:42"
  subject="Re: [Caml-list] Int overflow in literals">
<msg 
  url="2003/10/01c93c3b596bd48aae49b6a21497ec25"
  from="Jacques Garrigue &lt;garrigue@k...&gt;"
  author="Jacques Garrigue"
  date="2003-10-31T00:18:33"
  subject="Re: [Caml-list] Int overflow in literals">
<msg 
  url="2003/10/6a6b72183aecc41c4e1860237ead3072"
  from="Kenneth Knowles &lt;kknowles@u...&gt;"
  author="Kenneth Knowles"
  date="2003-10-31T02:07:24"
  subject="Re: [Caml-list] Int overflow in literals">
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2003/10/79116eaedef6aebf445400b42b5f4c4c"
  from="Frederic van der Plancke &lt;fvdp@d...&gt;"
  author="Frederic van der Plancke"
  date="2003-10-30T21:37:07"
  subject="Re: [Caml-list] Int overflow in literals">
<msg 
  url="2003/10/987054b9224e2bd160c22abe44f48756"
  from="Issac Trotts &lt;ijtrotts@u...&gt;"
  author="Issac Trotts"
  date="2003-10-30T23:22:07"
  subject="Re: [Caml-list] Int overflow in literals">
</msg>
<msg 
  url="2003/10/8f7f4d18c95a53d9fe2877b8acd0a6ad"
  from="Oleg Trott &lt;oleg_trott@c...&gt;"
  author="Oleg Trott"
  date="2003-10-30T23:44:35"
  subject="Re: [Caml-list] Int overflow in literals">
</msg>
</msg>
</msg>
<msg 
  url="2003/10/83d907aa36714be69cdf730269e4a127"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2003-10-31T16:56:31"
  subject="Re: [Caml-list] Int overflow in literals">
<msg 
  url="2003/11/b9b1de506ba3963ebae3afdd7b32f688"
  from="skaller &lt;skaller@o...&gt;"
  author="skaller"
  date="2003-11-02T16:25:22"
  subject="Re: [Caml-list] Int overflow in literals">
<msg 
  url="2003/11/44d8403aa5dcdbc1080f6c22e848b813"
  from="Marcin &apos;Qrczak&apos; Kowalczyk &lt;qrczak@k...&gt;"
  author="Marcin &apos;Qrczak&apos; Kowalczyk"
  date="2003-11-02T16:37:57"
  subject="Re: [Caml-list] Int overflow in literals">
</msg>
</msg>
<msg 
  url="2003/10/3ee55fa5ad37f8f091b0847426676598"
  from="Marcin &apos;Qrczak&apos; Kowalczyk &lt;qrczak@k...&gt;"
  author="Marcin &apos;Qrczak&apos; Kowalczyk"
  date="2003-10-31T17:39:41"
  subject="Re: [Caml-list] Int overflow in literals">
</msg>
<msg 
  url="2003/10/fbe703e603163a7f59b0105d784c2f43"
  from="Oleg Trott &lt;oleg_trott@c...&gt;"
  author="Oleg Trott"
  date="2003-10-31T17:51:22"
  subject="Re: [Caml-list] Int overflow in literals">
</msg>
</msg>
</msg>
</thread>

<contents>
Marcin 'Qrczak' Kowalczyk wrote:
&gt; I understand that int overflow is not checked on arithmetic for
&gt; efficiency reasons, but IMHO it would be better if it was checked
&gt; at least in literals. When someone writes 10000000000, he certainly
&gt; does not mean -737418240.
&gt; 
&gt; It caused confusion in a class when someone was interactively testing
&gt; a function with larger and larger inputs.
&gt; 

I bet the official answer is "It's can't be done because native integers 
are 31 bits on 32 bit platforms, 63 bits on 64 bit platforms, so what is 
parser supposed to do? Especially in the case of the bytecode compiler."
Although, I suppose something could be done in the toplevel.

Alex

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

