Skip to content

[ImportC] Error: static array parameters are not supported #22790

@cyrusmsk

Description

@cyrusmsk

Even though the comment

error("static array parameters are not supported");

mentioned C11, this feature seems supported even since C99:

For example, from here https://www.dii.uchile.cl/~daespino/files/Iso_C_1999_definition.pdf, section 6.7.5.3 Function declarators (including prototypes):

A declaration of a parameter as ‘‘array of type’’ shall be adjusted to ‘‘qualified pointer to
type’’, where the type qualifiers (if any) are those specified within the [ and ] of the
array type derivation. If the keyword static also appears within the [ and ] of the
array type derivation, then for each call to the function, the value of the corresponding
actual argument shall provide access to the first element of an array with at least as many
elements as specified by the size expression.

Any plans to implement this in ImportC?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions