Skip to content

Array accesses and bounds - #634

Open
Chris B (llvm-beanz) wants to merge 8 commits into
microsoft:mainfrom
llvm-beanz:cbieneman/array-access-ub
Open

Array accesses and bounds#634
Chris B (llvm-beanz) wants to merge 8 commits into
microsoft:mainfrom
llvm-beanz:cbieneman/array-access-ub

Conversation

@llvm-beanz

Copy link
Copy Markdown
Collaborator

This adds language documenting that out of bounds accesses for arrays is undefined behavior, and that zero-sized arrays are disallowed.

This also restricts arrays of unknown size to strictly global resource declarations but allows omitting the array bound if it can be inferred from an initiailzer.

Resolves #141

This adds language documenting that out of bounds accesses for arrays is
undefined behavior, and that zero-sized arrays are disallowed.

This also restricts arrays of unknown size to strictly global resource
declarations but allows omitting the array bound if it can be inferred
from an initiailzer.

Resolves microsoft#141
@github-actions github-actions Bot added the language-spec Issue with completed spec label Sep 9, 2025
Comment thread specs/language/declarations.tex Outdated
Chris B (llvm-beanz) added a commit to llvm-beanz/hlsl-specs that referenced this pull request Sep 16, 2025
After the meeting today we seem to have alignment here. I'm going to
mark this proposal as under review with PR microsoft#634 as the main review for
the spec contribution.
Chris B (llvm-beanz) added a commit that referenced this pull request Sep 17, 2025
After the meeting today we seem to have alignment here. I'm going to
mark this proposal as under review with PR #634 as the main review for
the spec contribution.

@hekota Helena Kotas (hekota) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread specs/language/declarations.tex Outdated
Comment thread specs/language/declarations.tex Outdated
Comment thread specs/language/declarations.tex Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

language-spec Issue with completed spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove unsized arrays

5 participants