Skip to content

Commit e52a52d

Browse files
author
CHIKI Badreddine
committed
Fix Issue #22790: Allow static array parameters in ImportC
1 parent b3e02d4 commit e52a52d

2 files changed

Lines changed: 0 additions & 6 deletions

File tree

compiler/src/dmd/cparse.d

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2994,10 +2994,6 @@ final class CParser(AST) : Parser!AST
29942994
{
29952995
error("variable length arrays are not supported");
29962996
}
2997-
if (isStatic) // C11 6.7.6.3
2998-
{
2999-
error("static array parameters are not supported");
3000-
}
30012997
if (declarator != DTR.xparameter)
30022998
{
30032999
/* C11 6.7.6.2-4: '*' can only be used with function prototype scope.

compiler/test/fail_compilation/failcstuff1.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,12 @@ fail_compilation/failcstuff1.c(260): Error: expected identifier for declarator
3232
fail_compilation/failcstuff1.c(301): Error: illegal type combination
3333
fail_compilation/failcstuff1.c(352): Error: found `2` when expecting `:`
3434
fail_compilation/failcstuff1.c(352): Error: found `:` instead of statement
35-
fail_compilation/failcstuff1.c(450): Error: static array parameters are not supported
3635
fail_compilation/failcstuff1.c(450): Error: static or type qualifier used in non-outermost array type derivation
3736
fail_compilation/failcstuff1.c(451): Error: static or type qualifier used in non-outermost array type derivation
3837
fail_compilation/failcstuff1.c(451): Error: array type has incomplete element type `int[0]`
3938
fail_compilation/failcstuff1.c(452): Error: array type has incomplete element type `int[0]`
4039
fail_compilation/failcstuff1.c(453): Error: array type has incomplete element type `int[0]`
4140
fail_compilation/failcstuff1.c(454): Error: found `const` when expecting `,`
42-
fail_compilation/failcstuff1.c(458): Error: static array parameters are not supported
4341
fail_compilation/failcstuff1.c(458): Error: static or type qualifier used outside of function prototype
4442
fail_compilation/failcstuff1.c(459): Error: static or type qualifier used outside of function prototype
4543
fail_compilation/failcstuff1.c(460): Error: variable length arrays are not supported

0 commit comments

Comments
 (0)