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

compile error: value 100000000000 overflows u32 #20877

Open
PedrelliMath opened this issue Feb 20, 2024 · 3 comments
Open

compile error: value 100000000000 overflows u32 #20877

PedrelliMath opened this issue Feb 20, 2024 · 3 comments
Labels
Bug This tag is applied to issues which reports bugs. Unit: Compiler Bugs/feature requests, that are related to the V compiler in general. Unit: Type System Bugs/feature requests, that are related to the V types system.

Comments

@PedrelliMath
Copy link

PedrelliMath commented Feb 20, 2024

Describe the bug

0.4.4 does not compile.

Reproduction Steps

$ asdf install v 0.4.4

Expected Behavior

(compile and install with no errors)

Current Behavior

vlib/strconv/f32_str.c.v:35:2: error: value 10000000000 overflows u32
33 | u32(100000000),
34 | u32(1000000000),
35 | u32(10000000000),
| ~~~~~~~~~~~~~~~~
36 | u32(100000000000),
37 | ]!
vlib/strconv/f32_str.c.v:36:2: error: value 100000000000 overflows u32
34 | u32(1000000000),
35 | u32(10000000000),
36 | u32(100000000000),
| ~~~~~~~~~~~~~~~~~
37 | ]!
38 |
make: *** [GNUmakefile:114: all] Error 1

  • ERROR: asdf-v Could not compile v@0.4.4
  • ERROR: asdf-v An error ocurred while installing v@0.4.4

Possible Solution

No response

Additional Information/Context

No response

V version

0.4.4

Environment details (OS name and version, etc.)

linux ubuntu 22.04

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@PedrelliMath PedrelliMath added the Bug This tag is applied to issues which reports bugs. label Feb 20, 2024
@PedrelliMath PedrelliMath changed the title error: value 100000000000 overflows u32 compile error: value 100000000000 overflows u32 Feb 20, 2024
@JalonSolov
Copy link
Contributor

There are no official packages for V in any package system. Recommend you install following these instructions https://github.com/vlang/v?tab=readme-ov-file#installing-v-from-source

@ylluminate
Copy link
Contributor

ylluminate commented Feb 20, 2024

@PedrelliMath the use of asdf is pretty interesting here, but I would suggest that if you use this (or have built the asdf module yourself?), please update the module so that it uses the "install from source method" to both install V and update V until V reaches 1.0.

@viprip
Copy link

viprip commented Mar 2, 2024

This is the same issue on macOS as well. I built from the source, for this specific version in particular, and I'm agree with the compiler since there is a real overflow from the last two values; 10,000,000,000 and 100,000,000,000 cannot fit into a u32 type. However, I observed there’d been removed from master with the #20641

@felipensp felipensp added Unit: Compiler Bugs/feature requests, that are related to the V compiler in general. Unit: Type System Bugs/feature requests, that are related to the V types system. labels Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs. Unit: Compiler Bugs/feature requests, that are related to the V compiler in general. Unit: Type System Bugs/feature requests, that are related to the V types system.
Projects
None yet
Development

No branches or pull requests

5 participants