From: Olivier Andrieu <oandrieu@nerim.net>
To: Matej Kosik <kosik@fiit.stuba.sk>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] 2147483648l < 2147483647l
Date: Tue, 5 Jan 2010 14:17:01 +0100 [thread overview]
Message-ID: <95513601001050517g5f65322au4e0bcce7374734eb@mail.gmail.com> (raw)
In-Reply-To: <4B4337A0.8000603@fiit.stuba.sk>
On Tue, Jan 5, 2010 at 13:59, Matej Kosik <kosik@fiit.stuba.sk> wrote:
> Hello,
>
> I am sorry, I have a stupid question.
> I would like to ask if this:
>
> # 2147483648l < 2147483647l;;
> - : bool = true
>
> should not regarded as a bug. In my project I need Int32 value and above
> behavior surprised me. Value
>
> 2147483648l
>
> should not be allowed at all because it cannot be encoded to 32-bit
> signed integer encoded with 2's complement representation.
>
> Thanks in advance for help.
yes that's a "misfeature" of the lexer/parser. The point is that it
accepts -2147483648l (representable as an int32) ; the downside is
that it accepts 2147483648l and treats it as -1l.
Cf. this bug report: http://caml.inria.fr/mantis/view.php?id=4210 .
--
Olivier
next prev parent reply other threads:[~2010-01-05 13:17 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 ` Olivier Andrieu [this message]
2010-01-05 13:26 ` [Caml-list] " David Allsopp
2010-01-19 17:59 ` Goswin von Brederlow
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=95513601001050517g5f65322au4e0bcce7374734eb@mail.gmail.com \
--to=oandrieu@nerim.net \
--cc=caml-list@yquem.inria.fr \
--cc=kosik@fiit.stuba.sk \
/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