mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +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
|
array_decl
|
||||||
: '[' const ']'
|
: '[' fexpr ']'
|
||||||
{
|
{
|
||||||
|
$2 = constant_expr ($2);
|
||||||
if ($2->type != ex_integer || $2->e.integer_val < 1) {
|
if ($2->type != ex_integer || $2->e.integer_val < 1) {
|
||||||
error (0, "invalid array size");
|
error (0, "invalid array size");
|
||||||
$$ = 0;
|
$$ = 0;
|
||||||
|
|
Loading…
Reference in a new issue