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

sysgpu: Shader compiler doesn't handle hexadecimal numbers with [eEfF] correctly #1340

Open
msg-programs opened this issue Jan 29, 2025 · 0 comments
Labels
bug Something isn't working needs-triage Issues that need triaging

Comments

@msg-programs
Copy link
Contributor

Uppercase Fs in a hex number cause an error.

null:4:26 error: expected ';', but found 'an identifier'
4 │     let x: u32 = 1234 & 0xFF;
                              ^~

Lowercase fs cause a different issue:

null:4:24 error: hexadecimal float literals not implemented
4 │     let x: u32 = 1234 & 0xff;
                            ^~~~      

The same error occurs with hex numbers containing a singular e/E:

null:4:28 error: hexadecimal float literals not implemented
4 │     let x: u32 = 1234 & 0x0E;
                            ^~~~
null:4:28 error: hexadecimal float literals not implemented
4 │     let x: u32 = 1234 & 0x0e;
                            ^~~~

Finally, numbers containing two es/Es also cause an error:

null:4:24 error: duplicate exponent 'E'
4 │     let x: u32 = 123 & 0xEE;
                           ^~~~

Putting other digits between two es doesn't change this:

null:4:24 error: duplicate exponent 'e'
4 │     let x: u32 = 123 & 0xe123e;
                           ^~~~~~~
@msg-programs msg-programs added bug Something isn't working needs-triage Issues that need triaging labels Jan 29, 2025
msg-programs added a commit to msg-programs/mach that referenced this issue Feb 8, 2025
msg-programs added a commit to msg-programs/mach that referenced this issue Feb 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Issues that need triaging
Projects
None yet
Development

No branches or pull requests

1 participant