[wgsl-in] Incorrect handling of negative integers with hex values #4492
Labels
area: naga front-end
lang: WGSL
WebGPU Shading Language
naga
Shader Translator
type: bug
Something isn't working
Milestone
The following isn't accepted right now (note that this is how the spec defines the minimum integer https://www.w3.org/TR/WGSL/#integer-types)
Instead this is accepted and probably shouldn't:
In fact, Tint will fail this with:
I thought originally that this is the actual error, but I think the reasoning over at the chrome bug I opened is correct and above should be rejected, see https://bugs.chromium.org/p/chromium/issues/detail?id=1439274
For anyone else running into this, note that
const i32min = -2147483648;
is accepted by both compilers.The text was updated successfully, but these errors were encountered: