Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Goswin von Brederlow <goswin-v-b@web.de>
To: "David Allsopp" <dra-news@metastack.com>
Cc: "OCaml List" <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] 2147483648l < 2147483647l
Date: Tue, 19 Jan 2010 18:59:51 +0100	[thread overview]
Message-ID: <87ska2gelk.fsf@frosties.localdomain> (raw)
In-Reply-To: <000101ca8e0a$aa006450$fe012cf0$@romulus.metastack.com> (David Allsopp's message of "Tue, 5 Jan 2010 13:26:16 -0000")

"David Allsopp" <dra-news@metastack.com> writes:

> Matej Kosik wrote:
>> I am sorry, I have a stupid question.
>> I would like to ask if this:
>> 
>> 	# 2147483648l < 2147483647l;;
>> 	- : bool = true
>
> The bug is in fact:
>
> # 2147483648l;;
> - : int32 = -2147483648l
>
> and given that behaviour, the above result makes sense! But...

Isn't that documented properly? I think in the docs I saw at least
that ocaml will silently overflow ints.

But yeah, the parser/compiler should really warn when that happens.

MfG
        Goswin


  reply	other threads:[~2010-01-19 17:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-05 12:59 Matej Kosik
2010-01-05 13:17 ` [Caml-list] " Olivier Andrieu
2010-01-05 13:26 ` David Allsopp
2010-01-19 17:59   ` Goswin von Brederlow [this message]
2010-01-19 18:28     ` David Allsopp
2010-01-19 19:15       ` Elnatan Reisner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ska2gelk.fsf@frosties.localdomain \
    --to=goswin-v-b@web.de \
    --cc=caml-list@yquem.inria.fr \
    --cc=dra-news@metastack.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox