Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

futur bug :) #3008

Closed
vicuna opened this issue Nov 2, 2001 · 1 comment
Closed

futur bug :) #3008

vicuna opened this issue Nov 2, 2001 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Nov 2, 2001

Original bug ID: 607
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Fabrice Le Fessant
Version: 3.03
OS: alpha
Submission from: curie.noos.net (212.198.0.93)

Dans pervasives.ml, le calcul de min_int est:

let min_int = 1 lsl (if 1 lsl 31 = 0 then 30 else 62)

qui fait appel a un calcul qui pourrait clairement etre optimise dans le futur,

et donc provoquer un bug.

On peut le corriger par:

external get_config: unit -> string * int = "sys_get_config"
let (os_type, word_size) = get_config()
let min_int = 1 lsl (word_size - 2)

@vicuna
Copy link
Author

vicuna commented Nov 26, 2001

Comment author: administrator

There is no bug here, and a future optimizer that would optimize this
computation away would just be buggy :-)

@vicuna vicuna closed this as completed Nov 26, 2001
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant