Rule 7.6
Chapter 7, Expressions and statements Not enforced
A read of a local before its first assignment is zero on WGSL and on the CPU, and undefined on GLSL ES 3.00; the divergence is recorded and the author should assign before reading.
The rule text and the parts under it are the compiler's own English, as the design document writes them.
Rationale
the two targets differ here, and the oracle follows WGSL by Rule 1.3.
Derives from
var Declarations (zero-initialization); surface §14.
How it is verified
Listed as not yet enforced. Appendix B of the design document records the rule, and no file checks it.
Where the rule says the compiler enforces it:
not enforced as a diagnostic; recorded in surface §14 (Appendix B).
Explained in
The sections of the surface document that explain this rule, at commit 26de7be8:
See also
Source
The rule at commit 26de7be8:
docs/language-design.md:570(the design document)reqs/rules/RULE-0706.md(its traceability item)