mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-17 01:11:45 +00:00
allow (constant) expressions in array declarators
This commit is contained in:
parent
a6c504936c
commit
c2dcc20d2a
1 changed files with 2 additions and 1 deletions
|
@ -458,8 +458,9 @@ param
|
|||
;
|
||||
|
||||
array_decl
|
||||
: '[' const ']'
|
||||
: '[' fexpr ']'
|
||||
{
|
||||
$2 = constant_expr ($2);
|
||||
if ($2->type != ex_integer || $2->e.integer_val < 1) {
|
||||
error (0, "invalid array size");
|
||||
$$ = 0;
|
||||
|
|
Loading…
Reference in a new issue