Skip to content

Remove unsized arrays #141

@llvm-beanz

Description

@llvm-beanz

Is your feature request related to a problem? Please describe.
We allow unsized arrays in most contexts that C would, but they sometimes cause crashes in the compiler and other unexpected behaviors. Unsized arrays also break the basic rules of HLSL parameter passing (which isn't great).

Describe the solution you'd like
We need to design a way to support unsized arrays (or something functionally equivalent) for resource types, but we should remove support for unsized arrays from the language (at least until we support general pointers).

Describe alternatives you've considered
In Clang we're more clearly defining the semantics for unsized arrays which will allow us to avoid some of the bugginess in DXC. We could stick with that approach, but it still leaves the language handling of unsized array parameters to be a bit awkward.

Additional context
See this documentation PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BreakingA proposal that will break at least some existing shaders

    Type

    No type

    Projects

    Status

    Triaged

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions