On Tue, Jan 5, 2010 at 13:59, Matej Kosik <ko...@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

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to