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?
Even though the comment
dmd/compiler/src/dmd/cparse.d
Line 2999 in e4608af
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):
Any plans to implement this in ImportC?